/* Residents Portal Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #f0e68c;
    --secondary-color: #d4af37;
    --accent-color: #f4d03f;
    --light-bg: #f8f9fa;
    --dark-text: #333;
    --border-color: #ddd;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.resident-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.main-content {
    padding: 2rem 3rem;
    max-width: 100%;
    flex: 1;
}



/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.navbar-brand {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.navbar-brand h2 {
    margin: 0;
    font-size: 1.4rem;
}

.navbar-brand .tagline {
    font-size: 0.75rem;
    opacity: 0.9;
    margin: 0;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 0;
    flex: 1;
    margin-left: 2rem;
}

.navbar-menu li {
    position: relative;
}

.navbar-menu a {
    color: white;
    text-decoration: none;
    padding: 0.75rem 1rem;
    display: block;
    transition: background 0.3s;
}

.navbar-menu a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.navbar-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.btn-login,
.btn-register,
.btn-account,
.btn-logout {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-register {
    background: rgba(255, 255, 255, 0.2);
}

.btn-register:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-account {
    background: rgba(255, 255, 255, 0.15);
}

.btn-account:hover {
    background: rgba(255, 255, 255, 0.25);
}

.btn-logout {
    background: rgba(220, 53, 69, 0.6);
}

.btn-logout:hover {
    background: rgba(220, 53, 69, 0.8);
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 2rem 1rem;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    margin-top: 3rem;
    padding: 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #555;
    padding-top: 1rem;
    color: #999;
}


/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 3rem 1rem;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.card-header {
    border-bottom: 2px solid var(--light-bg);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.card-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Service Cards */
.service-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 4px solid var(--primary-color);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.service-card p {
    color: #666;
    font-size: 0.95rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.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(102, 126, 234, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #556edb;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.alert-error,
.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left-color: #ffc107;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left-color: #17a2b8;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table thead {
    background: var(--light-bg);
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-weight: 600;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

/* Status Badge */
.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Announcements List */
.announcement-item {
    background: white;
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    box-shadow: var(--shadow);
}

.announcement-item h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.announcement-meta {
    color: #999;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Events List */
.event-item {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border-top: 3px solid var(--secondary-color);
}

.event-date {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.event-title {
    margin: 0.5rem 0 0 0;
    color: var(--dark-text);
}

/* Main Content Layout */
.main-content {
    padding: 2rem 3rem;
    max-width: 100%;
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.card-header {
    background: #f8f9fa;
    border-bottom: 2px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 8px 8px 0 0;
}

.card-header h2 {
    margin: 0;
    color: var(--dark-text);
    font-size: 1.5rem;
}

.card-body {
    padding: 2rem;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        padding: 1.5rem 2rem;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .service-icon {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem 1.5rem;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .service-card {
        padding: 1.25rem;
        border-top: 3px solid var(--primary-color);
    }

    .service-icon {
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
    }

    .service-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .service-card p {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 1rem;
    }

    .btn-sm {
        padding: 0.5rem 1rem !important;
        font-size: 0.85rem !important;
    }

    .form-row,
    .form-row-3 {
        grid-template-columns: 1fr;
    }

    .navbar-menu {
        display: none;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .table {
        font-size: 0.9rem;
    }

    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
    }
}
