:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #059669;
    --warning: #d97706;
    --error: #dc2626;
    --background: #f8fafc;
    --surface: #ffffff;
    --surface-secondary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

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

/* Header */
.site-header {
    position: relative;
    width: 100%;
    /* Added by Muneer 20250915*/
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.header-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0 0 12px 12px;
    box-shadow: var(--shadow-lg);
}

.login-btn,
.header-actions {
    position: absolute;
    right: 20px;
    top: 20px;
    display: flex;
    gap: 12px;
    align-items: center;
    z-index: 10;
}

.admin-info {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.card h1 {
    color: var(--text-primary);
    margin-bottom: 24px;
    font-size: 1.875rem;
    font-weight: 700;
}

.card h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-field input,
.form-field select {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--surface);
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover:not(:disabled) {
    background: #475569;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:hover:not(:disabled) {
    background: var(--primary);
    color: white;
}

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

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

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

/* Ticket Canvas */
.ticket-canvas {
    width: 100%;
    max-width: 800px;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin: 20px 0;
}

/* Modal */
.modal {
    border: none;
    border-radius: 12px;
    width: min(90vw, 400px);
    padding: 0;
    box-shadow: var(--shadow-lg);
}

.modal[open] {
    animation: modalSlideIn 0.2s ease-out;
}

.modal-content {
    padding: 24px;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Error Messages */
.error {
    color: var(--error);
    font-size: 0.875rem;
    margin-top: 8px;
}

.success {
    color: var(--success);
    font-size: 0.875rem;
    margin-top: 8px;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-4 {
    margin-bottom: 1rem;
}

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

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-secondary);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .card {
        padding: 16px;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .login-btn,
    .header-actions {
        position: absolute;
        right: 10px;
        top: 10px;
        z-index: 10;
        gap: 8px;
    }

    .login-btn {
        font-size: 0.875rem;
        padding: 8px 16px;
    }

    .header-actions {
        flex-direction: column;
        gap: 4px;
    }

    .header-actions .btn {
        width: auto;
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .admin-info {
        font-size: 0.75rem;
        color: white;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    }

    .header-image {
        height: 150px;
    }

    /* Make stats smaller on mobile */
    /*.stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 12px;
    }*/

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

    .stat-label {
        font-size: 0.75rem;
    }

    .stats-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2px;
    }

    .stat-card {
        background: #f2f2f2;
        padding: 2px;
        min-width: 0;
    }
}

/* Print Styles */
@media print {

    .btn,
    .modal,
    .login-btn,
    .header-actions {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #000;
    }
}