/* Main Application Styles */

body {
    font-family: 'Barlow', sans-serif;
    font-kerning: normal;
    font-variant-ligatures: common-ligatures;
}
.font-sans { font-family: 'Barlow', sans-serif; }
.font-serif { font-family: 'IBM Plex Serif', serif; }
.font-display { font-family: 'Old Standard TT', sans-serif; }
.font-mono { font-family: 'Space Mono', monospace; }

/* Custom styles that extend Tailwind */
.container {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
}

.page-title {
  font-family: 'Old Standard TT', serif;
  font-size: 3rem;
  font-weight: 700;
  text-align: center;
  color: #1f2937;
  margin-bottom: 1rem;
}

h1, h2, h3 {
  font-family: 'IBM Plex Serif', serif;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
}

h1 {
  line-height: 0.9; 
  letter-spacing: -0.04em; 
}

h2 {
  line-height: 1.0; 
  letter-spacing: -0.04em; 
}

h3 {
  line-height: 1.1; 
  letter-spacing: -0.03em;
}

.form-container {
  background-color: #f9fafb;
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.25rem;
}

.form-input, .form-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.apartments-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .apartments-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .apartments-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .apartments-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.apartment-card {
  background-color: #f9fafb;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
}

.submit-button {
  width: 100%;
  background-color: #2563eb;
  color: #ffffff;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  transition: background-color 0.15s ease-in-out;
}

.submit-button:hover {
  background-color: #1d4ed8;
}

.secondary-button {
  width: 100%;
  background-color: #2563eb;
  color: #ffffff;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: background-color 0.15s ease-in-out;
}

.secondary-button:hover {
  background-color: #1d4ed8;
}

.success-message {
  background-color: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1.5rem;
}

.table-container {
  overflow-x: auto;
}

.data-table {
  min-width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  border: 1px solid #e5e7eb;
}

.table-header {
  background-color: #f9fafb;
}

.table-heading {
  padding: 0.75rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table-body {
  background-color: #ffffff;
}

.table-row:hover {
  background-color: #f9fafb;
}

.table-cell {
  padding: 1rem;
  white-space: nowrap;
  font-size: 0.875rem;
  color: #111827;
}

.table-cell-secondary {
  padding: 1rem;
  white-space: nowrap;
  font-size: 0.875rem;
  color: #6b7280;
}

.percentage-cell {
  padding: 1rem;
  white-space: nowrap;
  font-size: 0.875rem;
  color: #c7a16a;
  font-weight: 600;
}

.amount-cell {
  padding: 1rem;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 700;
  color: #a16207
}

.no-data-message {
  text-align: center;
  color: #6b7280;
  font-style: italic;
  padding: 2rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1rem;
}

.month-section {
  margin-bottom: 2rem;
}

.month-title {
  font-size: 1.125rem;
  font-weight: 500;
  color: #1f2937;
  margin-bottom: 0.75rem;
}

.highlight-amount {
  font-weight: 700;
  color: #a16207
}

/* Responsive adjustments for form-grid in index.php */
@media (min-width: 768px) {
  .form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Additional responsive adjustments */
@media (min-width: 1024px) {
  .data-table th,
  .data-table td {
    padding: 0.75rem 1rem;
  }
}


/* Glass panel styles */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    box-shadow: var(--bloom-shadow);
    transition: all 0.3s ease;
}
.glass-strong {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 0;
}

/* Mask Gradient */
.mask-fade-right {
    -webkit-mask-image: linear-gradient(to right, black 60%, transparent 100%);
    mask-image: linear-gradient(to right, black 60%, transparent 100%);
}



/* Hover effect for interactive panels */
a.glass-panel:hover,
button.glass-panel:hover,
.glass-panel.interactive:hover {
    transform: translateY(-2px);
    box-shadow:
        0 20px 40px -10px rgba(253, 61, 87, 0.15),
        0 0 30px rgba(224, 242, 254, 0.4); /* Blue bloom on hover */
    border-color: rgba(253, 61, 87, 0.2);
}

/* =========================================
   SIDEBAR LAYOUT
   ========================================= */
.sidebar {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.5);
    transition:
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 30;
}
/* Desktop Sidebar */
@media (min-width: 769px) {
    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: 12rem;
        transform: translateX(0);
        border-radius: 0;
        margin-left: -1.2rem;
        padding-top: 6rem;
    }
    .sidebar.collapsed {
        width: 4rem;
        margin-left: 0; 
    }
}
/* Mobile Sidebar */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: 70%;
        margin-left: -1rem;
        max-width: 20rem;
        transform: translateX(-100%);
        background: rgba(255, 255, 255, 0.5);
    }
    .sidebar.open {
        transform: translateX(0);
    }
}
/* Collapsed Sidebar Styles */
@media (min-width: 769px) {
    .sidebar.collapsed .nav-link {
        justify-content: center;
        padding: 0; 
    }
    .sidebar.collapsed .nav-link span {
        display: none;
    }
    .sidebar.collapsed .nav-link svg {
        margin-right: 0;
    }
    .sidebar.collapsed h2 {
        display: none;
    }
    .sidebar.collapsed #sidebar-collapse svg {
        transform: rotate(180deg);
    }
    .sidebar.collapsed .quick-tip {
        display: none;
    }
}



/* Nav Links */
.nav-link {
    position: relative;
    height: 44px; 
    padding: 0 1.5rem; 
    border-radius: 12px;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
}

.nav-link:hover {
    background: linear-gradient(
        to right,
        #f0f9ff,
        white
    );
    color: var(--brand-red);
    border-color: var(--serenity);
}

.nav-link.active {
    background: white;
    color: var(--brand-red);
    border: 1px solid var(--gold-soft);
    box-shadow: 0 4px 15px -3px rgba(252, 211, 77, 0.2);
}

.nav-link::after {
    display: none;
}

.nav-link span {
    font-size: 13px; 
}

.nav-link svg {
    width: 1.75rem !important; 
    height: 1.75rem !important;
}


/* Cards */
.card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

// CSS for the details drawer in admin_users.php
.user-details-drawer {
    position: absolute;
    left: 0; 
    top: 100%; 
    z-index: 1000;
    background: white;
    min-width: 375px;
    max-width: 450px;
}
.user-details-summary {
    cursor: pointer;
    color: #6b7280;
    list-style: none;
}
.user-details-summary::-webkit-details-marker {
    display: none;  /* Hide default marker in webkit browsers */
}
.user-details-summary:hover {
    color: #6b7280;
}
.user-details-wrapper {
    position: relative;
    display: inline-block;
}
.user-details-close {
    position: absolute;
    top: 0;
    right: 0;
    cursor: pointer;
    color: #9ca3af;
    font-size: 1.25rem;
    line-height: 1;
    border-radius: 0.25rem;
}
.user-details-close:hover {
    color: #374151;
    background-color: #f3f4f6;
}


