/**
 * Receipt Voucher Management System - Styles
 * AL AWAN TRAVELS AND TOURISM
 */

:root {
    --primary: #1976d2;
    --primary-dark: #1565c0;
    --secondary: #424242;
    --success: #4caf50;
    --danger: #f44336;
    --warning: #ff9800;
    --info: #2196f3;
    --text-primary: #212121;
    --text-secondary: #757575;
    --border: #e0e0e0;
    --bg-light: #f5f5f5;
    --card-bg: #ffffff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================================================
   NAVIGATION BAR
   ============================================================================ */

.nav-bar {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.back-to-dashboard {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: var(--transition);
    font-weight: 500;
}

.back-to-dashboard:hover {
    background: rgba(255, 255, 255, 0.15);
}

.nav-title {
    flex: 1;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================================================
   MAIN CONTAINER
   ============================================================================ */

.main-container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

/* ============================================================================
   TABS NAVIGATION
   ============================================================================ */

.tabs-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: white;
    padding: 10px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.tab-btn:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
}

.tab-btn i {
    font-size: 16px;
}

/* ============================================================================
   TAB CONTENT
   ============================================================================ */

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   RECEIPT FORM
   ============================================================================ */

.receipt-form-container {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.form-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 20px 30px;
}

.form-header h2 {
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-body {
    padding: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 14px;
}

.required {
    color: var(--danger);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    transition: var(--transition);
    font-family: inherit;
}

.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(25, 118, 210, 0.1);
}

.form-group input:read-only {
    background: var(--bg-light);
    cursor: not-allowed;
}

#amountWords {
    background: #f8fafc;
    font-style: italic;
    color: #555;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* ============================================================================
   FORM ACTIONS
   ============================================================================ */

.form-actions {
    display: flex;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: #616161;
    transform: translateY(-2px);
}

/* ============================================================================
   RECEIPTS LIST
   ============================================================================ */

.list-container,
.settings-container {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 30px;
}

.list-header,
.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.list-header h2,
.settings-header h2 {
    color: var(--primary);
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-filter {
    display: flex;
    gap: 10px;
    align-items: center;
}

#searchReceipts {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 250px;
    font-size: 14px;
}

#searchReceipts:focus {
    outline: none;
    border-color: var(--primary);
}

/* ============================================================================
   TABLE
   ============================================================================ */

.table-container {
    overflow-x: auto;
}

.receipts-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.receipts-table thead {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.receipts-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.receipts-table tbody tr {
    border-bottom: 1px solid #e8eef3;
    transition: background-color 0.2s ease;
}

.receipts-table tbody tr:hover {
    background: #f8fafc;
}

.receipts-table td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text-primary);
}

/* ============================================================================
   STATUS BADGES
   ============================================================================ */

.status-badge {
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-badge.status-paid {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge.status-due {
    background: #fff3e0;
    color: #ef6c00;
}

/* ============================================================================
   ACTION BUTTONS
   ============================================================================ */

.action-cell {
    display: flex;
    gap: 6px;
    align-items: center;
}

.action-btn {
    padding: 6px 10px;
    border: 1px solid var(--border);
    background: #f8fafc;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-btn i {
    font-size: 14px;
}

.action-btn.print:hover {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #81c784;
}

.action-btn.delete:hover {
    background: #ffebee;
    color: #c62828;
    border-color: #ef5350;
}

/* ============================================================================
   SETTINGS
   ============================================================================ */

.settings-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h3 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 18px;
}

.image-preview {
    margin-top: 10px;
}

.image-preview img {
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
    .nav-bar {
        padding: 12px 15px;
    }

    .nav-title {
        font-size: 16px;
    }

    .main-container {
        padding: 0 10px;
        margin: 15px auto;
    }

    .tabs-nav {
        flex-wrap: wrap;
    }

    .tab-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .form-body {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .search-filter {
        flex-direction: column;
        width: 100%;
    }

    #searchReceipts {
        width: 100%;
    }

    .receipts-table {
        font-size: 12px;
    }

    .receipts-table th,
    .receipts-table td {
        padding: 10px 8px;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
    }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    .nav-bar,
    .tabs-nav,
    .search-filter,
    .form-actions,
    .action-cell {
        display: none;
    }

    body {
        background: white;
    }

    .main-container {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
}
