.v-center {
  display: flex;
  align-items: center; }

.center-align-c {
  float: none;
  display: flex;
  justify-content: center; }

.img-responsive {
  width: 100%;
  height: auto; }

/* --- Font Sizes --- */
.font20 {
  font-size: 20px; }

.font30 {
  font-size: 30px; }

.font35 {
  font-size: 35px; }

/* ------ */
/* --- Main CSS --- */
/* Prevent horizontal scrollbars on auth layout, but allow vertical scrolling
   so both columns (hero + form) are reachable on tablets like iPad. */
.tp-body {
  overflow-x: hidden;
  overflow-y: auto; }

/* Plain panel for auth forms (no grey background, no shadow) */
.auth-panel {
  background: #ffffff;
  border-radius: 8px;
  padding: 24px; }

.tp-body .row > .col {
  min-height: 100vh; }

.tp-body .tp-preface,
.tp-body .tp-signup,
.tp-body .tp-signin {
  padding: 30px;
  /* prevent 100vh + padding from causing page scroll */
  min-height: 100vh;
  box-sizing: border-box; }

/* Left hero stays vertically centered */
.tp-body .tp-preface {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; }

/* Right auth panels vertically centered, still scroll if content is tall */
.tp-body .tp-signup,
.tp-body .tp-signin {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; }

/* Keep left hero fixed and allow only the right auth panel to scroll */
.tp-body .tp-signup,
.tp-body .tp-signin {
  height: 100vh;
  overflow-y: auto; }

.tp-body .tp-preface {
  color: white;
  background: #051d2e;
  text-align: center;
  padding: 30px; }

/* Ensure right column has no grey background */
.tp-body .tp-signin,
.tp-body .tp-signup {
  background: transparent !important; }

/* Override any inline background that might come from an old JS bundle */
.tp-signin div[style*="background"],
.tp-signup div[style*="background"] {
  background: transparent !important;
  box-shadow: none !important; }

.tp-preface .tp-header-container .tp-heading {
  font-size: 37px; }

.tp-preface .tp-header-container .tp-sub-heading {
  font-size: 20px;
  opacity: 0.75; }

.tp-preface .tp-why-us-container,
.tp-preface .tp-testimony-container {
  background: #122b3c;
  border-radius: 10px; }

.tp-preface .tp-testimony-container {
  /* add breathing room at bottom */
  margin-bottom: 24px; }

/* Remove extra top margin on the very first logo row */
.tp-preface .tp-header-container p.mt-3 {
  margin-top: 0 !important; }

.tp-preface .tp-testimony-container .tp-testimony {
  background: #183245;
  border-radius: 10px; }

.tp-preface .tp-why-us-container .why-us-text {
  font-size: 30px;
  color: #73949f;
  display: block;
  margin-bottom: 1rem; }

.tp-preface .tp-why-us-container p::after {
  font-family: "Material Design Icons";
  content: "\F0133";
  margin-left: 10px;
  color: #00c9a5; }

.tp-preface .tp-testimony-container .row > [class*="col-"] {
  padding: 1.5rem; }

.tp-preface .tp-sponsors {
  display: flex;
  align-items: center;
  gap: 5%;
  justify-content: space-between; }

.tp-preface .tp-sponsors span img {
  width: 100%;
  height: auto; }

/* ------ */
/* --- Form CSS --- */
.tp-form .form-group {
  margin-bottom: 2rem; }

.tp-form label {
  color: #696f79;
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 1rem; }

.tp-form .form-check {
  display: flex;
  align-items: center;
  gap: 10px; }

.tp-form .form-check .form-check-label {
  margin-bottom: 0; }

.tp-form input.form-control,
.tp-form select.form-control {
  border: 1px solid #8692a6;
  padding: 1.5rem; }

.tp-form .tp-select {
  position: relative; }

.tp-form .tp-select::after {
  font-family: "Material Design Icons";
  content: "\F0B26";
  color: #c5dfe7;
  float: right;
  font-size: 25px;
  position: absolute;
  right: 3%;
  top: calc(50% - 1rem); }

.tp-form input::placeholder {
  color: #8692a6; }

.tp-form .submit-btn {
  color: white;
  background: #051d2e;
  width: 100%;
  padding: 1.5rem;
  font-size: 20px;
  font-weight: 500; }

/** App css below **/
#tp-app {
  height: 100vh; }

/* Role selection (landing) */
.role-select-form .role-option {
  cursor: pointer; }

.role-select-form input[type="radio"] {
  display: none; }

.role-select-form .role-card {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 16px 20px;
  background: #ffffff; }

.role-select-form input[type="radio"]:checked + .role-card {
  border-color: #0d6efd;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25); }

.role-select-form .role-label {
  font-weight: 600; }

.role-select-form .role-description {
  font-size: 0.9rem;
  color: #6c757d; }

/* ------- */
/* Company contractors: tooltip styling for extra structures list (+N more) */
.contractor-structures-more {
  border-radius: 4px;
  padding: 0 4px;
  transition: background 0.15s ease; }

.contractor-structures-more:hover {
  background: #e6f4ff; }

.contractor-structures-tooltip .ant-tooltip-inner {
  transition: background 0.15s ease; }

.contractor-structures-tooltip:hover .ant-tooltip-inner {
  background: #f5f5f5; }

.contractor-structures-tooltip-item {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 13px; }

.contractor-structures-tooltip-item:hover {
  background: #e6f4ff;
  color: #0f172a; }

/* Shared calendar trigger button (attendance + executed items) */
.calendar-trigger.ant-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  border-color: #d9d9d9;
  background: #ffffff;
  padding-inline: 10px 12px; }

.calendar-trigger-label {
  font-size: 13px;
  font-weight: 500; }

.calendar-trigger-date {
  font-size: 13px;
  color: #0f172a; }

.calendar-trigger-arrow {
  font-size: 10px;
  color: rgba(0, 0, 0, 0.45); }

.calendar-trigger.ant-btn:hover,
.calendar-trigger.ant-btn:focus {
  border-color: #1677ff;
  background: #e6f4ff; }

.calendar-trigger.ant-btn:hover .calendar-trigger-arrow,
.calendar-trigger.ant-btn:focus .calendar-trigger-arrow {
  color: #1677ff; }

/* (Structure overview cards now use Ant Design Row/Col layout
   directly; no extra grid/flex styling needed here.) */
/* Dashboard overview (company + structures tabs) */
.tp-dashboard .tp-overview-summary {
  color: #0f172a; }

.tp-dashboard .tp-overview-summary .ant-card {
  border-radius: 8px; }

.tp-dashboard .tp-overview-summary .ant-card-head-title {
  font-size: 14px;
  font-weight: 600; }

.tp-dashboard .tp-overview-summary .tp-metric-label {
  font-size: 11px;
  color: rgba(15, 23, 42, 0.55); }

.tp-dashboard .tp-overview-summary .tp-metric-value {
  font-size: 20px;
  font-weight: 600; }

.tp-dashboard .tp-overview-summary .tp-metric-note {
  font-size: 11px;
  color: rgba(15, 23, 42, 0.6); }

.tp-dashboard .tp-overview-summary .tp-structure-snapshot-card {
  background: #ffffff;
  border-color: #f0f0f0; }

.tp-dashboard .tp-overview-summary .tp-structure-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  margin: 4px 0 12px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #f0f0f0; }

/* Smaller, inline auth error styling inside auth panel */
.auth-errors .tp-flash {
  font-size: 12px;
  padding: 6px 8px;
  margin-bottom: 8px; }

/** Media Queries **/
@media (max-width: 576px) {
  .tp-preface .tp-testimony-container .tp-testimony {
    background: unset; }
  /* Make auth forms narrower on small mobile screens */
  .auth-panel {
    padding: 16px; }
  /* Reduce font sizes for better mobile readability */
  .tp-preface .tp-header-container .tp-heading {
    font-size: 28px; }
  .tp-preface .tp-header-container .tp-sub-heading {
    font-size: 16px; }
  .tp-preface .tp-why-us-container .why-us-text {
    font-size: 24px; }
  .tp-preface .tp-why-us-container,
  .tp-preface .tp-testimony-container {
    padding: 16px; }
  /* Reduce padding on mobile auth pages */
  .tp-body .tp-preface,
  .tp-body .tp-signup,
  .tp-body .tp-signin {
    padding: 16px; } }

@media (max-width: 768px) {
  .tp-body .container-fluid > .row {
    flex-direction: column-reverse; }
  /* Stack hero and form on tablets/mobile */
  .tp-body .row > .col {
    min-height: auto; }
  /* Allow hero to be smaller on mobile */
  .tp-body .tp-preface {
    min-height: 60vh;
    padding: 24px 16px; }
  /* Make form section more compact */
  .tp-body .tp-signup,
  .tp-body .tp-signin {
    height: auto;
    min-height: 40vh;
    padding: 24px 16px; } }

/** ---------- */
/* --- Dashboard (TP-like) --- */
.tp-dashboard {
  height: 100vh;
  overflow: hidden;
  /* Keep the shell fixed to the viewport; scroll only inside content */ }

/* Use dynamic viewport height where supported (iPad / mobile Safari fix) */
@supports (height: 100dvh) {
  .tp-dashboard {
    height: 100dvh; } }

.tp-dashboard .tp-sider {
  background: #0e2a3f !important; }

/* Sidebar navigation: make the active item clearly stand out. */
.tp-dashboard .tp-sider .ant-menu-item {
  border-radius: 6px;
  margin: 2px 8px; }

.tp-dashboard .tp-sider .ant-menu-item-selected {
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: inset 3px 0 0 #3b82f6; }

.tp-dashboard .tp-sider .ant-menu-item:hover {
  background: rgba(255, 255, 255, 0.06) !important; }

.tp-dashboard .tp-sider .ant-menu:last-child {
  /* Bottom logout section spacing */
  margin-top: 0; }

.tp-dashboard .tp-sider .ant-menu,
.tp-dashboard .tp-sider .ant-menu * {
  color: #d6e2e7 !important; }

.tp-dashboard .tp-sider .ant-menu-item-selected,
.tp-dashboard .tp-sider .ant-menu-item-selected * {
  color: #ffffff !important; }

.tp-dashboard .ant-layout-content {
  /* airy content area like TP */
  padding: 24px;
  background: #f7f9fb;
  min-height: 0;
  overflow-y: auto;
  /* Allow the main content area to scroll while sidebar stays fixed */ }

/* Ensure wide Ant Design tables scroll horizontally within the dashboard
   content area instead of causing the whole viewport to overflow. */
.tp-dashboard .ant-table-wrapper {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* Smooth scrolling on iOS */ }

/* Make table cells more touch-friendly on mobile and tablet (including iPad) */
@media (max-width: 1024px) {
  .tp-dashboard .ant-table-thead > tr > th,
  .tp-dashboard .ant-table-tbody > tr > td {
    padding: 12px 8px;
    white-space: nowrap; }
  /* Make action buttons more touch-friendly */
  .tp-dashboard .ant-btn-sm {
    padding: 6px 12px;
    min-width: 44px;
    /* Minimum touch target */
    min-height: 32px; }
  /* Better spacing for table action buttons */
  .tp-dashboard .ant-space-horizontal {
    gap: 8px !important; } }

@media (max-width: 768px) {
  .tp-dashboard .ant-layout-content {
    padding: 16px 12px; }
  /* Make dashboard header more compact on mobile */
  .tp-dashboard-header-inner {
    height: 56px;
    padding: 0 8px; }
  .tp-dashboard-header-left {
    gap: 12px; } }

/* Extra small mobile devices */
@media (max-width: 480px) {
  .tp-dashboard .ant-layout-content {
    padding: 12px 8px; }
  /* Even more compact on very small screens */
  .tp-dashboard-header-inner {
    height: 52px; } }

.tp-dashboard-header {
  background: #ffffff;
  padding: 0 16px;
  border-bottom: 1px solid #f0f0f0; }

.tp-dashboard-header-inner {
  display: flex;
  height: 64px;
  align-items: center;
  justify-content: space-between; }

.tp-dashboard-header-left {
  display: flex;
  align-items: center;
  gap: 8px; }

.tp-dashboard-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #0f172a;
  padding: 0; }

.tp-dashboard-menu-toggle:hover {
  background: #f5f5f5;
  border-color: #d9d9d9; }

/* Show menu toggle only on larger screens (desktop) */
@media (min-width: 1025px) {
  .tp-dashboard-menu-toggle {
    display: none !important; } }

/* Always show on mobile and tablet (including iPad) */
@media (max-width: 1024px) {
  .tp-dashboard-menu-toggle {
    display: inline-flex !important; } }

/* Mobile and tablet sidebar overlay improvements */
@media (max-width: 1024px) {
  /* When sidebar is open on mobile/tablet, add backdrop */
  .tp-dashboard .ant-layout-sider {
    position: fixed !important;
    z-index: 1000;
    height: 100vh; }
  /* Ensure content area takes full width on mobile/tablet */
  .tp-dashboard .ant-layout {
    margin-left: 0 !important; } }

/* Table-like rows for dashboard lists (projects, etc.) */
.tp-dashboard .tp-dashboard-table-row {
  display: grid;
  grid-template-columns: minmax(0, 2.5fr) minmax(0, 2fr) minmax(0, 1.5fr) auto;
  align-items: center;
  padding: 8px 12px;
  column-gap: 16px; }

.tp-dashboard .tp-dashboard-table-row + .tp-dashboard-table-row {
  border-top: 1px solid #f0f0f0; }

.tp-dashboard .tp-dashboard-table-row__actions {
  text-align: center; }

/* Subtle styling for Ant Design tables used in dashboard lists */
.ant-table-tbody > tr:nth-child(even) > td {
  background: #fbfdff; }

.ant-table-tbody > tr:hover > td {
  background: #f5f7fa; }

/* Smaller table headers specifically for project details tables */
.tp-project-details-table .ant-table-thead > tr > th {
  font-size: 11px;
  padding-top: 6px;
  padding-bottom: 6px; }

/* Compact headers for billing suppliers table inside structure overview */
.tp-billing-suppliers-table .ant-table-thead > tr > th {
  white-space: nowrap;
  font-size: 11px; }

@media (max-width: 1024px) {
  .tp-dashboard .tp-dashboard-table-row {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.4fr);
    row-gap: 4px;
    padding: 12px 8px; }
  .tp-dashboard .tp-dashboard-table-row__meta,
  .tp-dashboard .tp-dashboard-table-row__actions {
    grid-column: 1 / -1;
    margin-top: 8px; }
  .tp-dashboard .tp-dashboard-table-row__actions {
    text-align: left;
    display: flex;
    gap: 8px;
    flex-wrap: wrap; }
  /* Make project/contractor tables more mobile and tablet-friendly */
  .tp-dashboard .tp-dashboard-table-row__primary {
    font-size: 14px; }
  .tp-dashboard .tp-dashboard-table-row__secondary {
    font-size: 12px; } }

/* --------------------------- */
/* --- Mobile & Tablet Modal & Form Improvements --- */
/* Make modals responsive on mobile and tablet (including iPad) */
@media (max-width: 1024px) {
  .ant-modal {
    max-width: calc(100vw - 32px) !important;
    margin: 16px auto; }
  .ant-modal-content {
    border-radius: 8px; }
  .ant-modal-header {
    padding: 16px 20px; }
  .ant-modal-body {
    padding: 20px;
    max-height: calc(100vh - 200px);
    overflow-y: auto; }
  .ant-modal-footer {
    padding: 12px 20px; }
  /* Make form inputs more touch-friendly */
  .ant-input,
  .ant-input-number,
  .ant-picker,
  .ant-select-selector {
    min-height: 40px; }
  .ant-btn {
    min-height: 40px;
    padding: 8px 16px; }
  .ant-form-item {
    margin-bottom: 16px; }
  /* Better spacing for form labels */
  .ant-form-item-label > label {
    height: auto;
    font-size: 14px; } }

@media (max-width: 480px) {
  .ant-modal {
    max-width: calc(100vw - 16px) !important;
    margin: 8px auto; }
  .ant-modal-header {
    padding: 12px 16px; }
  .ant-modal-body {
    padding: 16px; }
  .ant-modal-footer {
    padding: 10px 16px; }
  /* Stack modal footer buttons on very small screens */
  .ant-modal-footer .ant-btn + .ant-btn {
    margin-left: 0;
    margin-top: 8px; }
  .ant-modal-footer {
    display: flex;
    flex-direction: column-reverse;
    gap: 8px; }
  .ant-modal-footer .ant-btn {
    width: 100%;
    margin: 0; } }

/* --------------------------- */
/* --- Clean Flash messages --- */
.tp-flash {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 16px;
  border: 1px solid transparent; }

.tp-flash .mdi {
  font-size: 18px;
  line-height: 1.2;
  margin-top: 0; }

.tp-flash--error {
  background: #fff2f0;
  /* subtle red */
  border-color: #ffccc7;
  color: #a8071a; }

.tp-flash--info {
  background: #e6f4ff;
  /* subtle blue */
  border-color: #91caff;
  color: #0958d9; }

.tp-flash--success {
  background: #f6ffed;
  /* subtle green */
  border-color: #b7eb8f;
  color: #237804; }

/* --------------------------- */
/* --- Global Mobile & Tablet Touch Improvements --- */
/* Improve touch targets across the app (mobile and tablet including iPad) */
@media (max-width: 1024px) {
  /* Better spacing for interactive elements */
  .ant-space-item {
    margin-bottom: 8px; }
  /* Prevent Space components from having conflicting flex directions */
  .ant-space-horizontal {
    flex-wrap: wrap !important; }
  /* Ensure radio button groups stay inline but wrap properly */
  .ant-radio-group {
    display: inline-flex;
    flex-wrap: wrap; }
  .ant-radio-button-wrapper {
    flex: 0 0 auto; }
  /* Keep attendance toggle groups compact and inline */
  .attendance-toggle-group {
    display: inline-flex !important;
    flex-wrap: nowrap !important; }
  /* Improve select dropdowns on mobile and tablet */
  .ant-select-dropdown {
    max-height: 60vh; }
  /* Better date picker on mobile */
  .ant-picker-dropdown {
    max-width: calc(100vw - 32px); }
  /* Improve popover/dropdown positioning on mobile */
  .ant-popover,
  .ant-dropdown {
    max-width: calc(100vw - 32px); }
  /* Better scrolling for cards */
  .ant-card-body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; }
  /* Improve tabs on mobile */
  .ant-tabs-nav-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; }
  .ant-tabs-tab {
    padding: 12px 16px;
    margin: 0 4px; }
  /* Improve avatar sizing */
  .ant-avatar {
    width: 36px;
    height: 36px;
    line-height: 36px;
    font-size: 16px; } }

/* Extra improvements for very small screens */
@media (max-width: 480px) {
  /* Reduce general padding */
  .ant-card {
    border-radius: 6px; }
  /* More compact typography */
  h1, .ant-typography-h1 {
    font-size: 24px; }
  h2, .ant-typography-h2 {
    font-size: 20px; }
  h3, .ant-typography-h3 {
    font-size: 18px; }
  h4, .ant-typography-h4 {
    font-size: 16px; }
  /* Compact pagination */
  .ant-pagination {
    font-size: 12px; }
  .ant-pagination-item {
    min-width: 32px;
    height: 32px;
    line-height: 30px; } }

/* Landscape orientation improvements for mobile and tablet (including iPad) */
@media (max-width: 1024px) and (orientation: landscape) {
  .tp-dashboard .ant-layout-content {
    padding: 12px; }
  .ant-modal-body {
    max-height: calc(100vh - 150px); } }

/* --------------------------- */
