/* Senior Citizen Information System - Main Stylesheet */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --info-color: #06b6d4;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --body-bg: #f1f5f9;
    --sidebar-bg: #1e293b;
    --sidebar-active: #334155;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --card-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* General Styles */
body {
    font-family: var(--font-family);
    background-color: var(--body-bg);
    color: var(--dark-color);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

a {
    text-decoration: none;
}

/* Layout */
.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    background-color: var(--sidebar-bg);
    color: #fff;
    width: 250px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 1050;
    transition: all 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-logo {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: #fff;
    line-height: 1.3;
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border: none;
    border-radius: 0;
    position: relative;
}

.sidebar .nav-link:hover {
    background-color: var(--sidebar-active);
    color: #fff;
}

.sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: #fff;
}

.sidebar .nav-link i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.menu-header {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem 1.5rem 0.5rem;
    margin-top: 1rem;
}

.menu-header:first-child {
    margin-top: 0;
}

.badge-counter {
    margin-left: auto;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
}

/* Sidebar Toggle Button */
.sidebar-toggle-btn {
    position: fixed;
    top: 20px;
    left: 260px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    border: none;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1051;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
}

.sidebar-toggle-btn:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

.sidebar-toggle-btn i {
    transition: transform 0.3s ease;
}

/* Collapsed Sidebar */
.sidebar-collapsed .sidebar {
    width: 70px;
}

.sidebar-collapsed .sidebar-title,
.sidebar-collapsed .nav-link span,
.sidebar-collapsed .menu-header,
.sidebar-collapsed .badge-counter {
    display: none;
}

.sidebar-collapsed .sidebar-toggle-btn {
    left: 80px;
}

.sidebar-collapsed .sidebar-toggle-btn i {
    transform: rotate(180deg);
}

.sidebar-collapsed .content {
    margin-left: 70px;
}

/* Mobile Sidebar */
.mobile-toggle-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    border: none;
    border-radius: 8px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1052;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.mobile-toggle-btn:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

.mobile-toggle-btn:active {
    transform: scale(0.95);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1049;
    display: none;
}

/* Content Area */
.content {
    flex: 1;
    margin-left: 250px;
    transition: all 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-header {
    background-color: #fff;
    padding: 1rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1040;
}

.main-content {
    flex: 1;
    padding: 2rem;
}

/* User Info Dropdown */
.user-info {
    display: flex;
    align-items: center;
}

.user-info .dropdown-toggle {
    display: flex;
    align-items: center;
    color: var(--dark-color);
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.user-info .dropdown-toggle:hover {
    background-color: var(--light-color);
}

.user-name {
    font-weight: 600;
    margin-right: 0.5rem;
}

.user-role {
    font-size: 0.8rem;
    color: var(--secondary-color);
    background-color: var(--light-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: var(--card-hover-shadow);
    transform: translateY(-2px);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Dashboard Stats Cards */
.stats-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.stats-card.success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
}

.stats-card.warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
}

.stats-card.info {
    background: linear-gradient(135deg, var(--info-color) 0%, #0891b2 100%);
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30px, -30px);
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.stats-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

.stats-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    opacity: 0.3;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

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

.btn-warning {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
}

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Tables */
.table-container {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: var(--light-color);
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
    color: var(--dark-color);
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

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

/* Pagination */
.pagination {
    justify-content: center;
    margin-top: 2rem;
}

.page-link {
    border-radius: 8px;
    margin: 0 0.25rem;
    border: 2px solid #e2e8f0;
    color: var(--primary-color);
    font-weight: 600;
}

.page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-weight: 500;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
}

.alert-danger {
    background-color: #fef2f2;
    color: #dc2626;
}

.alert-warning {
    background-color: #fefce8;
    color: #a16207;
}

.alert-info {
    background-color: #f0f9ff;
    color: #0369a1;
}

/* Login Page */
.login-container {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 400px;
}

.login-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.login-logo {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

.login-body {
    padding: 2rem;
}

/* Quick Actions */
.quick-actions {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    margin: -2rem -2rem 2rem;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.quick-actions i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.action-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
    display: block;
    color: inherit;
}

.action-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--card-hover-shadow);
    color: inherit;
}

.action-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.action-card.success i {
    color: var(--success-color);
}

.action-card h5 {
    font-weight: 600;
    margin: 0;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-approved {
    background-color: #d1fae5;
    color: #065f46;
}

.status-rejected {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-active {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Print Styles */
@media print {
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
    }

    .sidebar,
    .content-header,
    .sidebar-toggle-btn,
    .mobile-toggle-btn,
    .btn,
    .pagination,
    .no-print {
        display: none !important;
    }

    .content {
        margin-left: 0 !important;
    }

    .main-content {
        padding: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        margin-bottom: 1rem !important;
    }

    .table {
        font-size: 10pt;
    }

    .table thead th {
        background-color: #f5f5f5 !important;
        color: black !important;
    }

    .print-header {
        text-align: center;
        margin-bottom: 2rem;
        border-bottom: 2px solid #333;
        padding-bottom: 1rem;
    }

    .print-header h1 {
        font-size: 18pt;
        margin-bottom: 0.5rem;
    }

    .print-header h2 {
        font-size: 14pt;
        margin-bottom: 0.5rem;
    }

    .print-footer {
        text-align: center;
        margin-top: 2rem;
        border-top: 1px solid #333;
        padding-top: 1rem;
        font-size: 10pt;
    }
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .overlay {
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .overlay.show {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    .content {
        margin-left: 0;
    }

    .content-header {
        padding-left: 80px;
    }

    .main-content {
        padding: 1rem;
    }

    .sidebar-toggle-btn {
        display: none !important;
    }

    .stats-number {
        font-size: 2rem;
    }

    .action-card {
        margin-bottom: 1rem;
    }

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

@media (max-width: 575.98px) {
    .content-header {
        padding: 1rem;
        padding-left: 70px;
    }

    .main-content {
        padding: 1rem 0.5rem;
    }

    .stats-number {
        font-size: 1.75rem;
    }

    .login-body {
        padding: 1.5rem;
    }

    .login-header {
        padding: 1.5rem;
    }
}

/* Custom Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Additional Utility Classes */
.text-muted {
    color: var(--secondary-color) !important;
}

.bg-light {
    background-color: var(--light-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.shadow-sm {
    box-shadow: var(--card-shadow) !important;
}

.rounded-lg {
    border-radius: 12px !important;
}

/* Login Footer */
.login-footer {
    background-color: var(--light-color);
    padding: 1rem 2rem;
    text-align: center;
    color: var(--secondary-color);
    border-top: 1px solid #e2e8f0;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Form Validation */
.is-invalid {
    border-color: var(--danger-color) !important;
}

.is-valid {
    border-color: var(--success-color) !important;
}

.invalid-feedback {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.valid-feedback {
    color: var(--success-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
} 