/* LegalWing CRM - Main Stylesheet */
:root {
    --primary-color: #1a365d;
    --primary-light: #2d4f8c;
    --secondary-color: #d4af37;
    --accent-color: #2a9d8f;
    --danger-color: #e63946;
    --success-color: #2a9d8f;
    --warning-color: #e9c46a;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gray-light: #e9ecef;
    --gray-medium: #adb5bd;
    --gray-dark: #495057;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f7fb;
    color: var(--dark-color);
    line-height: 1.6;
}

/* Auth Screen */
.auth-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fb 0%, #e4edf5 100%);
}

.auth-box {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: 450px;
    padding: 40px;
    margin-bottom: 20px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo-icon {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-container h1 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.8rem;
}

.logo-container h1 span {
    color: var(--secondary-color);
}

.tagline {
    color: var(--gray-dark);
    font-size: 0.9rem;
    margin-top: 5px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    color: var(--gray-medium);
}

.input-with-icon input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.password-toggle {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: var(--gray-medium);
    cursor: pointer;
    font-size: 1rem;
}

.form-options {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 25px;
}

.form-options a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-options a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(26, 54, 93, 0.2);
}

.demo-credentials {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--secondary-color);
}

.demo-credentials p {
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--primary-color);
}

.credential-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-light);
}

.credential-row:last-child {
    border-bottom: none;
}

.credential-row span {
    font-size: 0.85rem;
    color: var(--gray-dark);
}

.btn-copy {
    background: none;
    border: 1px solid var(--gray-medium);
    border-radius: 4px;
    color: var(--gray-dark);
    padding: 4px 8px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-copy:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.auth-footer {
    text-align: center;
    color: var(--gray-dark);
    font-size: 0.85rem;
    margin-top: 20px;
}

.no-owner-note {
    color: var(--danger-color);
    font-weight: 600;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary, .btn-cancel {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
    min-width: 100px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-light);
}

.btn-secondary {
    background-color: var(--gray-light);
    color: var(--dark-color);
}

.btn-secondary:hover {
    background-color: var(--gray-medium);
    color: white;
}

.btn-cancel {
    background-color: white;
    color: var(--dark-color);
    border: 1px solid var(--gray-light);
}

.btn-cancel:hover {
    background-color: var(--gray-light);
}

/* Dashboard */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, var(--primary-color) 0%, #0f1e3a 100%);
    color: white;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}



.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header .logo-container {
    justify-content: flex-start;
    margin-bottom: 15px;
}

.sidebar-header .logo-container h2 {
    color: white;
    font-size: 1.3rem;
    transition: var(--transition);
}


.role-badge {
    display: inline-block;
    padding: 5px 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.user-info {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.user-details h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.user-details p {
    font-size: 0.85rem;
    color: var(--gray-medium);
}

.sidebar.collapsed .user-details {
    display: none;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 5px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-left: 3px solid var(--secondary-color);
}

.sidebar-nav i {
    width: 25px;
    font-size: 1.1rem;
    margin-right: 15px;
}

.sidebar.collapsed .sidebar-nav span {
    display: none;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-logout {
    width: 100%;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
}

.btn-logout:hover {
    background-color: rgba(230, 57, 70, 0.8);
}

.sidebar.collapsed .btn-logout span {
    display: none;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 10;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-toggle:hover {
    color: var(--primary-light);
}

#page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.notification-icon {
    position: relative;
    font-size: 1.3rem;
    color: var(--gray-dark);
    cursor: pointer;
}

.notification-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.society-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--gray-light);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--dark-color);
}

.society-info i {
    color: var(--primary-color);
}

/* Content Wrapper */
.content-wrapper {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    background-color: #f8fafc;
}

/* Dashboard Cards */
.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.dashboard-header p {
    color: var(--gray-dark);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.draft { background-color: var(--gray-medium); }
.stat-icon.uploaded { background-color: var(--warning-color); }
.stat-icon.active { background-color: var(--success-color); }
.stat-icon.expired { background-color: var(--danger-color); }
.stat-icon.archived { background-color: var(--dark-color); }

.stat-info h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.stat-info p {
    color: var(--gray-dark);
    font-size: 0.9rem;
}

/* Tables */
.table-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-bottom: 30px;
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--gray-light);
}

/* Back Button */

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    background: #ffffff;
    border: 1px solid #e2e8f0;

    padding: 8px 14px;
    border-radius: 8px;

    font-size: 14px;
    font-weight: 500;
    color: #1a365d;

    cursor: pointer;
    transition: all 0.25s ease;

    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.btn-back i {
    font-size: 13px;
}

/* Hover */
.btn-back:hover {
    background: #1a365d;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.table-header h3 {
    color: var(--primary-color);
}

.table-actions {
    display: flex;
    gap: 10px;
}

.btn-action {
    padding: 8px 15px;
    background-color: var(--gray-light);
    border: none;
    border-radius: var(--border-radius);
    color: var(--dark-color);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-action.primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-action.primary:hover {
    background-color: var(--primary-light);
}

.btn-action.secondary {
    background-color: white;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-action.secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: #f8f9fa;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 1px solid var(--gray-light);
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--gray-light);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background-color: #f8fafc;
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-draft { background-color: #e9ecef; color: #495057; }
.status-uploaded { background-color: #fff3cd; color: #856404; }
.status-active { background-color: #d1e7dd; color: #0f5132; }
.status-expired { background-color: #f8d7da; color: #721c24; }
.status-archived { background-color: #d6d8d9; color: #1b1e21; }

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background-color: var(--gray-light);
    color: var(--dark-color);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Tenant View */
.tenant-container {
    max-width: 800px;
    margin: 0 auto;
}

.agreement-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-bottom: 30px;
}

.agreement-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 25px;
    text-align: center;
}

.agreement-header h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.agreement-status {
    display: inline-block;
    padding: 8px 20px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-weight: 600;
    margin-top: 10px;
}

.agreement-body {
    padding: 30px;
}

.agreement-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.detail-group {
    margin-bottom: 20px;
}

.detail-group label {
    display: block;
    color: var(--gray-dark);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.detail-group p {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--dark-color);
}

.detail-group input, .detail-group select, .detail-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
    margin-top: 5px;
}

.detail-group input:focus, .detail-group select:focus, .detail-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.helper-text {
    font-size: 0.8rem;
    color: var(--gray-medium);
    margin-top: 5px;
}

.agreement-timeline {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-light);
}

.timeline-title {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline:before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--gray-light);
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item:before {
    content: '';
    position: absolute;
    left: -20px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

.timeline-item.active:before {
    background-color: var(--success-color);
}

.timeline-item.passed:before {
    background-color: var(--gray-medium);
}

.timeline-date {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.timeline-content {
    color: var(--gray-dark);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-dark);
}

.empty-state i {
    font-size: 4rem;
    color: var(--gray-light);
    margin-bottom: 20px;
}

.empty-state h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background-color: var(--gray-light);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }
.text-success { color: var(--success-color); }

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        height: 100%;
        left: -250px;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .main-content {
        width: 100%;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .auth-box {
        padding: 30px 20px;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .table-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .agreement-details {
        grid-template-columns: 1fr;
    }
    
    th, td {
        padding: 10px;
    }
}

/* ===== Scroll Fix ===== */
.dashboard-container {
    height: 100vh;
    overflow: hidden;
}

.content-wrapper {
    height: calc(100vh - 70px);
    overflow-y: auto;
    padding: 20px;
}


/* ===== Modal Styling ===== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-box {
    background: #fff;
    width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 25px;
    border-radius: 8px;
}

.modal-box input {
    width: 100%;
    margin-bottom: 12px;
    padding: 8px;
}

.row {
    display: flex;
    gap: 10px;
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

/* ============================= */
/* MODAL STYLING */
/* ============================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.modal-box {
    background: #ffffff;
    padding: 30px;
    width: 500px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-box h3 {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

/* Inputs + Select */
.modal-box input,
.modal-box select {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 14px;
    border-radius: 6px;
    border: 1px solid #d0d5dd;
    font-size: 14px;
    outline: none;
    transition: 0.2s;
}

.modal-box input:focus,
.modal-box select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
}

/* Two column row */
.flex-row {
    display: flex;
    gap: 10px;
}

.flex-row input {
    width: 100%;
}

/* Buttons */
.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-primary {
    background: #3b82f6;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    font-weight: 500;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #e5e7eb;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
}


/* =====================================
   AGREEMENT ACTION BUTTONS
===================================== */

.action-group {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.btn-action {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 75px;
}

.btn-view {
    background-color: #3b82f6;
    color: white;
}

.btn-view:hover {
    background-color: #2563eb;
}

.btn-download {
    background-color: #10b981;
    color: white;
}

.btn-download:hover {
    background-color: #059669;
}

.btn-edit {
    background-color: #3c91c9;
    color: white;
}

.btn-edit:hover {
    background-color: #55e5f5;
}

/* ===== CHAIRMAN ACTION BUTTONS ===== */

.btn-approve {
    background-color: var(--success-color);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-approve:hover {
    background-color: #1f7a6d;
}

.btn-reject {
    background-color: var(--danger-color);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-reject:hover {
    background-color: #b02a37;
}

/* Chairman Extras */

.society-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: var(--box-shadow);
}

#searchInput {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid var(--gray-light);
}

#statusFilter {
    padding: 8px;
    border-radius: 6px;
}

#pagination {
    margin-top: 15px;
    text-align: center;
}

.page-btn {
    margin: 0 4px;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--gray-light);
    cursor: pointer;
}

.page-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
}

.toast.success { background-color: #2a9d8f; }
.toast.error { background-color: #e63946; }


/* ===== AGENT DASHBOARD IMPROVEMENTS ===== */

.status-badge {
    text-transform: uppercase;
}

.status-draft { background-color: #e9ecef; color: #495057; }
.status-active { background-color: #d1e7dd; color: #0f5132; }

.table-container {
    margin-top: 20px;
}

.stat-card {
    cursor: default;
}

.stat-card:hover {
    transform: none;
}

/* ================= STATUS BADGES ================= */

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.status-draft {
    background: #f0f0f0;
    color: #555;
}

.status-approved {
    background: #e6f7ee;
    color: #0f8b4c;
}

.status-rejected {
    background: #fdeaea;
    color: #d93025;
}

/* ================= ACTION BUTTONS ================= */

.action-group {
    display: flex;
    gap: 6px;
}

.btn-action {
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s ease;
    font-size: 13px;
}

.btn-action i {
    pointer-events: none;
}

.btn-action.success {
    background: #d1f3df;
    color: #0f8b4c;
}

.btn-action.warning {
    background: #fff4d6;
    color: #b08900;
}

.btn-action.info {
    background: #e3f2fd;
    color: #1565c0;
}

.btn-action.secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-action.danger {
    background: #fdeaea;
    color: #d93025;
}

.btn-action:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}


/* ================= TABLE IMPROVEMENT ================= */

.table-container {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    margin-top: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f7f9fc;
}

thead th {
    text-align: left;
    padding: 12px;
    font-weight: 600;
    font-size: 14px;
    color: #444;
}

tbody td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

tbody tr:hover {
    background: #f9fbff;
}

.dashboard-header {
    margin-bottom: 25px;
}

.dashboard-header h2 {
    font-size: 24px;
    font-weight: 600;
}

.dashboard-header p {
    color: #777;
    margin-top: 4px;
}

.table-actions {
    display: flex;
    gap: 10px;
}

.btn-action.primary {
    background: #1f3c88;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
}

.btn-action.primary:hover {
    background: #162e68;
}

/* ======================================
PDF COLUMN ALIGNMENT FIX
====================================== */

table th:last-child,
table td:last-child {
    text-align: center;
}

.action-group {
    display: flex;
    justify-content: center;
    gap: 8px;
}

/* HEADER MAIN */
.header-bar {
    display: flex;
    align-items: center;
    width: 100%;
}

/* LEFT TITLE */
.header-left {
    flex: 1;
    display: flex;
    align-items: center;
}

/* RIGHT BELL */
.header-right {
    display: flex;
    align-items: center;
}

/* BELL */
.notification-box {
    position: relative;
    cursor: pointer;
    font-size: 20px;
    color: #333;
}

/* BADGE */
.notification-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: red;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 50%;
}

.header-bar h2 {
    margin: 0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* FIX */
    gap: 20px;
}




/* =========================================
   MOBILE RESPONSIVE (IMPORTANT)
========================================= */

/* TABLE SCROLL */
.table-container {
    overflow-x: auto;
}

/* FIX TABLE WIDTH */
table {
    min-width: 700px;
}

/* MOBILE VIEW */
@media (max-width: 768px) {

    /* SIDEBAR */
    .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    height: 100%;
    width: 250px;
    z-index: 999;
    transition: 0.3s ease;
}

.sidebar.open {
    left: 0;
}

    /* MAIN CONTENT */
    .main-content {
        width: 100%;
    }

    .main-content {
    position: relative;
    z-index: 1;
}

    /* HEADER FIX */
    .topbar {
        padding: 10px 15px;
    }

    #page-title {
        font-size: 16px;
    }

    /* TABLE HEADER FIX */
    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* ACTION BUTTONS */
    .table-actions {
        flex-wrap: wrap;
    }

    /* INPUT + BUTTON GROUP */
    .table-header input,
    .table-header select {
        width: 100%;
    }

    /* BUTTON FULL WIDTH */
    .btn-action,
    .btn-back {
        width: 100%;
        justify-content: center;
    }

    /* MODAL */
    .modal-box {
        width: 90%;
        padding: 20px;
    }

}

/* ==========================================
MOBILE RESPONSIVE
========================================== */

@media (max-width: 768px) {

    /* SIDEBAR */
    #sidebar {
        position: fixed;
        left: -250px;
        top: 0;
        width: 250px;
        height: 100%;
        z-index: 1000;
        transition: 0.3s;
    }

    #sidebar.open {
        left: 0;
    }

    /* CONTENT */
    #content-wrapper {
        margin-left: 0 !important;
        padding: 15px;
    }

    /* HEADER */
    .dashboard-header h2 {
        font-size: 18px;
    }

    /* STATS */
    .stats-container {
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* TABLE SCROLL */
    .table-container {
        overflow-x: auto;
    }

    table {
        min-width: 700px;
    }

    /* INPUT + FILTER */
    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* BUTTON */
    .btn-action {
        font-size: 12px;
        padding: 6px 10px;
    }

}