/* =================================
   Global Styles
   ================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --light-bg: #f8fafc;
    --dark-text: #1e293b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Prompt', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--dark-text);
    line-height: 1.6;
    min-height: 100vh;
}

/* =================================
   Login Page
   ================================= */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-box {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 40px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header .logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.login-header .logo i {
    font-size: 36px;
    color: white;
}

.login-header h1 {
    font-size: 28px;
    color: var(--dark-text);
    margin-bottom: 10px;
}

.login-header p {
    color: var(--secondary-color);
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-text);
    font-weight: 500;
    font-size: 14px;
}

.login-form label i {
    color: var(--primary-color);
    margin-right: 5px;
}

.login-form input[type="text"],
.login-form input[type="password"],
.login-form input[type="email"],
.login-form input[type="tel"],
.login-form input[type="number"],
.login-form select,
.login-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: 'Prompt', sans-serif;
}

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

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: 400;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Prompt', sans-serif;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

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

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

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

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

.btn-block {
    width: 100%;
    margin-top: 10px;
}

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.demo-info {
    background: var(--light-bg);
    padding: 15px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.8;
    color: var(--secondary-color);
}

.demo-info code {
    background: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
    font-size: 12px;
}

/* =================================
   Dashboard Layout
   ================================= */
.dashboard {
    background: var(--light-bg);
}

.navbar {
    background: white;
    box-shadow: var(--shadow);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-text);
    text-decoration: none;
}

.navbar-brand i {
    color: var(--primary-color);
    font-size: 24px;
}

.navbar-menu {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-link {
    padding: 8px 16px;
    color: var(--dark-text);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.nav-link:hover,
.nav-link.active {
    background: var(--light-bg);
    color: var(--primary-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 20px;
    border-left: 1px solid var(--border-color);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--dark-text);
}

.user-role {
    font-size: 12px;
    color: var(--secondary-color);
}

.btn-logout {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-logout:hover {
    background: #fee2e2;
}

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* =================================
   Statistics Cards
   ================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.stat-icon.blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.stat-icon.green {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.stat-icon.orange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.stat-icon.red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.stat-icon.purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.stat-details h3 {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 5px;
}

.stat-details p {
    color: var(--secondary-color);
    font-size: 14px;
}

/* =================================
   Content Cards
   ================================= */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h2 i {
    color: var(--primary-color);
}

.card-body {
    padding: 24px;
}

.card-actions {
    display: flex;
    gap: 10px;
}

/* =================================
   Forms
   ================================= */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-text);
    font-weight: 500;
    font-size: 14px;
}

.form-group label .required {
    color: var(--danger-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: 'Prompt', sans-serif;
}

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

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* =================================
   Tables
   ================================= */
.table-container {
    overflow-x: auto;
}

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

.table thead {
    background: var(--light-bg);
}

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

.table th {
    font-weight: 600;
    color: var(--dark-text);
    font-size: 14px;
}

.table td {
    font-size: 14px;
    color: var(--secondary-color);
}

.table tbody tr {
    transition: background 0.2s ease;
}

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

/* =================================
   Status Badges
   ================================= */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

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

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

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

.badge-in-progress {
    background: #dbeafe;
    color: #1e40af;
}

.badge-completed {
    background: #d1fae5;
    color: #065f46;
}

.badge-cancelled {
    background: #e5e7eb;
    color: #374151;
}

/* =================================
   Search & Filters
   ================================= */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-input i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
}

.search-input input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

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

.filter-group {
    display: flex;
    gap: 10px;
}

.filter-group select {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* =================================
   Action Buttons in Tables
   ================================= */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =================================
   Notifications
   ================================= */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
    }
    to {
        transform: translateX(0);
    }
}

.notification.show {
    display: flex;
}

.notification.success {
    border-left: 4px solid var(--success-color);
}

.notification.error {
    border-left: 4px solid var(--danger-color);
}

.notification.warning {
    border-left: 4px solid var(--warning-color);
}

.notification.info {
    border-left: 4px solid var(--info-color);
}

.notification i {
    font-size: 20px;
}

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

.notification.error i {
    color: var(--danger-color);
}

.notification.warning i {
    color: var(--warning-color);
}

.notification.info i {
    color: var(--info-color);
}

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

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-text);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--light-bg);
    color: var(--dark-text);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* =================================
   Receipt Print Styles
   ================================= */
.receipt-content {
    max-width: 800px;
    margin: 0 auto;
}

.receipt-header {
    text-align: center;
    padding: 20px;
    border-bottom: 2px solid var(--dark-text);
    margin-bottom: 30px;
}

.receipt-header h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.receipt-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.receipt-section {
    margin-bottom: 20px;
}

.receipt-section h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.receipt-table {
    width: 100%;
    margin-bottom: 20px;
}

.receipt-table th,
.receipt-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid var(--border-color);
}

.receipt-total {
    text-align: right;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    padding: 20px 0;
    border-top: 2px solid var(--dark-text);
}

/* =================================
   Loading Spinner
   ================================= */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =================================
   Responsive Design
   ================================= */
@media (max-width: 768px) {
    .navbar-container {
        flex-direction: column;
        gap: 15px;
    }

    .navbar-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .user-info {
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-left: 0;
        padding-top: 15px;
        width: 100%;
        justify-content: center;
    }

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

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

    .search-bar {
        flex-direction: column;
    }

    .search-input {
        min-width: 100%;
    }

    .filter-group {
        flex-direction: column;
    }

    .filter-group select {
        width: 100%;
    }

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

    .table {
        min-width: 800px;
    }

    .card-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .card-actions {
        width: 100%;
    }

    .card-actions .btn {
        flex: 1;
    }
}

/* =================================
   Print Styles
   ================================= */
@media print {
    body * {
        visibility: hidden;
    }

    .receipt-content,
    .receipt-content * {
        visibility: visible;
    }

    .receipt-content {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    .btn,
    .navbar,
    .card-header .btn {
        display: none !important;
    }
}

/* =================================
   Empty State
   ================================= */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--secondary-color);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 14px;
}
