/* Bonus Management System - Stylesheet */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --light: #f8fafc;
    --dark: #1e293b;
    --border: #e2e8f0;
    --text: #334155;
    --text-muted: #94a3b8;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--light);
    color: var(--text);
    line-height: 1.6;
}

/* Navigation */
.navbar {
    background: var(--dark);
    color: white;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-brand a {
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
}

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

.nav-menu a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-menu a:hover {
    color: white;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.nav-user a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: white;
    min-width: 160px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 4px;
    top: 100%;
    left: 0;
    z-index: 1001;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: var(--text) !important;
    padding: 0.75rem 1rem;
    display: block;
}

.dropdown-content a:hover {
    background: var(--light);
}

/* Container & Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

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

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.card h3 {
    font-size: 1rem;
    margin: 1rem 0 0.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

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

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

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

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

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

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

.btn-block {
    width: 100%;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
}

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

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

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

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

.form-inline .form-group {
    margin-bottom: 0;
}

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

.inline-form {
    display: inline;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

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

.table-input {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.875rem;
}

.table tr.inactive {
    opacity: 0.5;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.badge-admin { background: #dbeafe; color: #1e40af; }
.badge-manager { background: #fef3c7; color: #92400e; }
.badge-employee { background: #e0e7ff; color: #3730a3; }
.badge-active, .badge-approved, .badge-on_time { background: #dcfce7; color: #166534; }
.badge-inactive, .badge-pending { background: #fef3c7; color: #92400e; }
.badge-late { background: #ffedd5; color: #c2410c; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-completed { background: #dbeafe; color: #1e40af; }
.badge-archived { background: #f1f5f9; color: #475569; }

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Dashboard */
.dashboard h1 {
    margin-bottom: 1.5rem;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-card h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
}

.stat-number.warning {
    color: var(--warning);
}

.stat-card a {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
}

.stat-card .btn {
    margin-top: 0.5rem;
    margin-right: 0.5rem;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-card {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
}

.summary-card h3 {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.summary-card .stat-number {
    font-size: 1.5rem;
}

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

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
}

.login-box {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

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

.login-box .subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

/* Deliverables Grid */
.deliverables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1rem;
}

.deliverable-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1.25rem;
    border-left: 4px solid var(--primary);
}

.deliverable-card.overdue {
    border-left-color: var(--danger);
}

.deliverable-header h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.project-name {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.deliverable-meta {
    display: flex;
    gap: 1.5rem;
    margin: 1rem 0;
    padding: 0.75rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.meta-item label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.meta-item span.overdue {
    color: var(--danger);
    font-weight: 600;
}

.submit-form textarea {
    margin-bottom: 0.5rem;
}

.validation-info {
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
}

.validation-info.success { background: #dcfce7; }
.validation-info.warning { background: #fef3c7; }
.validation-info.error { background: #fee2e2; }

.validation-info .notes {
    margin-top: 0.5rem;
    font-style: italic;
    color: var(--text-muted);
}

/* Lead List */
.lead-list {
    list-style: none;
    margin-bottom: 1rem;
}

.lead-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.lead-name {
    font-weight: 500;
}

.lead-since {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Info Box */
.info-box {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.info-box h3 {
    color: #0369a1;
    margin-bottom: 0.75rem;
}

.info-box p, .info-box ul {
    font-size: 0.875rem;
    color: #0c4a6e;
}

.info-box ul {
    margin-left: 1.25rem;
    margin-top: 0.5rem;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.info-item span {
    font-size: 1rem;
}

/* Bonus List */
.bonus-list {
    list-style: none;
}

.bonus-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.bonus-list .amount {
    font-weight: 600;
}

/* Amount */
.amount {
    font-weight: 600;
    color: var(--dark);
}

/* Radio Group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
}

.radio-option input {
    margin-top: 0.25rem;
}

.radio-option small {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h2 {
    margin-bottom: 1rem;
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Filter Bar */
.filter-bar {
    margin-bottom: 1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.empty-state h3 {
    margin-bottom: 0.5rem;
}

.empty-state a {
    color: var(--primary);
}

/* Error Page */
.error-page {
    text-align: center;
    padding: 3rem;
}

.error-page h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-page p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input {
    width: auto;
}

/* Text utilities */
.text-muted {
    color: var(--text-muted);
}

.mt-2 {
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        height: auto;
        padding: 1rem;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        margin: 1rem 0;
    }

    .container {
        padding: 1rem;
    }

    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .deliverables-grid {
        grid-template-columns: 1fr;
    }

    .deliverable-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-right: 1rem;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.lang-link {
    color: rgba(255,255,255,0.6) !important;
    text-decoration: none;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.lang-link:hover {
    color: white !important;
    background: rgba(255,255,255,0.1);
}

.lang-active {
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--primary);
    border-radius: 4px;
}

/* Documentation Styles */
.docs-container {
    max-width: 900px;
    margin: 0 auto;
}

.docs-container .page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.docs-container .page-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.docs-container .subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

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

.docs-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
    text-align: center;
    border: 2px solid transparent;
}

.docs-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: var(--primary);
}

.docs-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.docs-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.docs-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.docs-quick-start {
    margin-top: 2rem;
}

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

.steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-number {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.step-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Documentation Content */
.docs-nav {
    margin-bottom: 1.5rem;
}

.docs-content {
    padding: 2rem;
}

.docs-content h1 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.docs-content h2 {
    font-size: 1.35rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
    color: var(--dark);
}

.docs-content h3 {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.docs-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.docs-content ul, .docs-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.docs-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.docs-toc {
    background: var(--light);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.docs-toc h4 {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.docs-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.docs-toc li {
    margin-bottom: 0.5rem;
}

.docs-toc a {
    color: var(--primary);
    text-decoration: none;
}

.docs-toc a:hover {
    text-decoration: underline;
}

.docs-note, .docs-warning, .docs-example {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.docs-note {
    background: #e0f2fe;
    border-left: 4px solid var(--primary);
}

.docs-warning {
    background: #fef3c7;
    border-left: 4px solid var(--warning);
}

.docs-example {
    background: var(--light);
    border: 1px solid var(--border);
}

.docs-example h4 {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.docs-table th, .docs-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.docs-table th {
    background: var(--light);
    font-weight: 600;
    font-size: 0.875rem;
}

/* Formula Page */
.formula-section {
    margin-bottom: 2rem;
}

.formula-box {
    background: var(--dark);
    color: #22d3ee;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1rem;
    margin: 1rem 0;
    overflow-x: auto;
}

.formula-box code {
    font-family: 'Fira Code', 'Consolas', monospace;
}

.formula-table td:first-child {
    font-family: monospace;
    color: var(--primary);
}

.calculation-example {
    background: white;
    border: 2px solid var(--primary);
}

.calculation-steps {
    background: var(--light);
    padding: 1rem;
    border-radius: 8px;
    font-family: monospace;
}

.calculation-steps p {
    margin-bottom: 0.5rem;
}

.final-result {
    font-size: 1.25rem;
    color: var(--success);
    margin-top: 1rem !important;
}

/* FAQ Styles */
.faq-section {
    margin-bottom: 2rem;
}

.faq-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.faq-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.faq-question {
    padding: 1rem 1.25rem;
    margin: 0;
    font-size: 1rem;
    cursor: pointer;
    background: var(--light);
    border-bottom: 1px solid var(--border);
}

.faq-answer {
    padding: 1rem 1.25rem;
}

.faq-answer p, .faq-answer ol {
    margin-bottom: 0.75rem;
}

.faq-answer p:last-child, .faq-answer ol:last-child {
    margin-bottom: 0;
}

.faq-contact {
    background: var(--primary);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin-top: 2rem;
}

.faq-contact h2 {
    border: none;
    margin: 0 0 0.5rem 0;
    padding: 0;
}

.faq-contact p {
    margin: 0;
    opacity: 0.9;
}

/* Responsive Docs */
@media (max-width: 768px) {
    .docs-grid {
        grid-template-columns: 1fr;
    }
    
    .docs-content {
        padding: 1rem;
    }
    
    .formula-box {
        font-size: 0.9rem;
        padding: 1rem;
    }
    
    .lang-switcher {
        padding-right: 0.5rem;
        margin-right: 0.5rem;
    }
}

