/* 
  Windsor Oaks Resident Management System
  Main Stylesheet
  Copyright © 2026 Windsor Oaks Resident Management System
*/

/* ============================================================================
   RESET & BASE STYLES
   ========================================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --success-color: #16a34a;
    --warning-color: #ca8a04;
    --danger-color: #dc2626;
    --info-color: #0891b2;
    
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================================================
   NAVIGATION
   ========================================================================= */

.navbar {
    background-color: var(--surface-color);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.nav-menu a:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
}

.nav-menu a.logout {
    color: var(--danger-color);
}

/* ============================================================================
   MAIN CONTAINER
   ========================================================================= */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

/* ============================================================================
   MESSAGES/ALERTS
   ========================================================================= */

.messages {
    margin-bottom: 1.5rem;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
    border-left: 4px solid var(--success-color);
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background-color: #dbeafe;
    color: #1e3a8a;
    border-left: 4px solid var(--info-color);
}

/* ============================================================================
   BUTTONS
   ========================================================================= */

.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 0.5rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #475569;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #15803d;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-block {
    width: 100%;
    display: block;
}

/* ============================================================================
   LOGIN PAGE
   ========================================================================= */

.login-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    background: var(--surface-color);
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.login-form {
    margin-top: 2rem;
}

.login-footer {
    margin-top: 2rem;
    text-align: center;
}

.small-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ============================================================================
   FORMS
   ========================================================================= */

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input.readonly {
    background-color: var(--bg-color);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-section {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.form-section h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

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

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

/* ============================================================================
   DASHBOARD
   ========================================================================= */

.dashboard h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stats-grid {
    display: grid;
/*    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));  */
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    position: relative;
    border: 1px solid var(--border-color);
}

.stat-card h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2rem;
    opacity: 0.5;
}

.quick-actions {
    margin: 3rem 0;
}

.quick-actions h2 {
    margin-bottom: 1.5rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.button-row {
    display: flex;
    gap: 2.5rem;              /* roughly "10 spaces" */
    align-items: center;
}

.action-btn {
    height: 38px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;

    background: #0d6efd;      /* bootstrap-ish blue */
    color: white;
    text-decoration: none;

    border: 1px solid #0d6efd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.action-btn:hover {
    opacity: 0.9;
}
.recent-activity {
    margin-top: 3rem;
}

.recent-activity h2 {
    margin-bottom: 1.5rem;
}

/* ============================================================================
   TABLES
   ========================================================================= */

.data-table {
    width: 100%;
    background: var(--surface-color);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.data-table thead {
    background-color: var(--bg-color);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr:hover {
    background-color: var(--bg-color);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.text-center {
    text-align: center;
}

.timestamp {
    white-space: nowrap;
}

/* ============================================================================
   BADGES
   ========================================================================= */

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
}

.badge-info {
    background-color: #cffafe;
    color: #164e63;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-secondary {
    background-color: #e2e8f0;
    color: #475569;
}

.badge-tertiary {
    background-color: #cfdfe3;
    color: #475569;
}

/* ============================================================================
   UNIT DETAIL PAGE
   ========================================================================= */

.page-header {
    display: flex;
    width: 105%; /* testing */
    justify-content: center;
    align-items: center;
/*    margin-bottom: 1rem; */
}

.page-header h1 {
    font-size: 2rem;
}

.unit-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-card {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    text-align: center;
}
.info-card d3 {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    text-align: left;
}


.info-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.info-card p {
    margin-bottom: 0.75rem;
}

.info-card row {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    display: flex;
    gap: 16px;
    flex: 1;
}

.info-card card{
    flex: 1;
}

.section {
    margin: 2rem 0;
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.5rem;
}

.empty-message {
    color: var(--text-secondary);
    font-style: italic;
    padding: 2rem;
    text-align: center;
}

/* ============================================================================
   FILTERS
   ========================================================================= */

.filters-section {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.filters-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.search-input,
.filter-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
}

.results-count {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================================================
   FOOTER
   ========================================================================= */

.footer {
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ============================================================================
   RESPONSIVE
   ========================================================================= */

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .filters-form {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

/* ============================================================================
   PRINT STYLES
   ========================================================================= */

@media print {
    .navbar,
    .btn,
    .filters-section,
    .footer {
        display: none;
    }
    
    body {
        background: white;
        font-size: 10;
    }
    
    .data-table {
        box-shadow: none;
    }
}
