@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-gradient: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #cbd5e1 100%);
    --card-bg: rgba(255, 255, 255, 0.78);
    --card-bg-hover: rgba(255, 255, 255, 0.9);
    --border-color: rgba(15, 23, 42, 0.08);
    --border-color-focus: rgba(147, 51, 234, 0.5);
    
    --primary: hsl(262, 83%, 58%);
    --primary-glow: hsla(262, 83%, 58%, 0.15);
    --primary-hover: hsl(262, 83%, 50%);
    
    --success: hsl(142, 76%, 33%);
    --success-glow: hsla(142, 76%, 33%, 0.1);
    --danger: hsl(350, 80%, 48%);
    --danger-glow: hsla(350, 80%, 48%, 0.1);
    --warning: hsl(45, 93%, 40%);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg-gradient);
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Glassmorphism Styles */
.glass-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px 0 rgba(15, 23, 42, 0.06);
    transition: var(--transition);
}

.glass-panel:hover {
    border-color: rgba(15, 23, 42, 0.15);
    box-shadow: 0 15px 40px 0 rgba(15, 23, 42, 0.1);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 var(--primary-glow); }
    70% { box-shadow: 0 0 20px 10px rgba(147, 51, 234, 0); }
    100% { box-shadow: 0 0 0 0 rgba(147, 51, 234, 0); }
}

@keyframes drawCheck {
    to { stroke-dashoffset: 0; }
}

@keyframes scaleUp {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.animate-fade {
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Auth Page layout */
.auth-container {
    max-width: 450px;
    width: 90%;
    margin: auto;
    padding: 40px;
    position: relative;
    z-index: 10;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #0f172a 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    padding: 12px 16px;
    font-size: 1rem;
    font-family: var(--font-main);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--border-color-focus);
    background: #ffffff;
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-main);
    font-weight: 600;
    padding: 12px 24px;
    font-size: 0.95rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #7e22ce 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(147, 51, 234, 0.4);
    background: linear-gradient(135deg, var(--primary-hover) 0%, #9333ea 100%);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(15, 23, 42, 0.1);
    border-color: rgba(15, 23, 42, 0.15);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 8px;
}

/* Alerts */
.alert {
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeIn 0.4s ease-out;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.06);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.alert-success {
    background: rgba(34, 197, 94, 0.06);
    color: #166534;
    border: 1px solid rgba(34, 197, 94, 0.15);
}

/* Layout components */
.navbar {
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #0f172a 20%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-user span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Container */
.container {
    max-width: 1200px;
    width: 95%;
    margin: 30px auto;
    flex-grow: 1;
}

/* Dashboard Widgets */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media(max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.stat-card.success::before {
    background: var(--success);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Data Tables */
.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th {
    padding: 16px 20px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.95rem;
    vertical-align: middle;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background: rgba(15, 23, 42, 0.02);
}

/* Actions list */
.actions {
    display: flex;
    gap: 8px;
}

/* Verification Card */
.verification-badge {
    text-align: center;
    margin-bottom: 30px;
}

.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--success-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--success);
    box-shadow: 0 0 20px var(--success-glow);
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 3;
    stroke-miterlimit: 10;
    stroke: var(--success);
    fill: none;
    animation: drawCheck 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke: var(--success);
    stroke-width: 3;
    fill: none;
    animation: drawCheck 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

.verify-title {
    font-size: 1.8rem;
    color: var(--success);
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.1);
}

.verify-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.detail-list {
    margin-bottom: 30px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

/* CSV Import block */
.import-box {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.import-box:hover {
    border-color: var(--primary);
    background: rgba(147, 51, 234, 0.03);
}

.import-box i {
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.import-box input[type="file"] {
    display: none;
}

/* Search Bar */
.search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input {
    flex-grow: 1;
}

/* Modal details */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.3);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.dialog-content {
    width: 90%;
    max-width: 550px;
    padding: 0;
    animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Print Layout Override */
@media print {
    body {
        background: white !important;
        color: black !important;
        font-family: "Segoe UI", Arial, sans-serif !important;
    }
    
    .navbar, .btn, .no-print, header, footer, .dashboard-grid, .search-container {
        display: none !important;
    }
    
    .container {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .print-only {
        display: block !important;
    }
    
    .glass-panel {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        padding: 0 !important;
    }
    
    .print-receipt {
        max-width: 500px;
        margin: 40px auto;
        border: 2px solid #ccc !important;
        border-radius: 10px;
        padding: 30px;
        text-align: center;
        background: white !important;
        color: black !important;
    }
    
    .print-receipt .detail-item {
        border-bottom: 1px solid #eee !important;
        color: black !important;
    }
    
    .print-receipt .detail-label {
        color: #555 !important;
    }
    
    .print-receipt .detail-value {
        color: black !important;
    }
    
    .print-qrcode-container {
        margin: 20px auto;
        display: flex;
        justify-content: center;
    }
    
    .print-qrcode-container canvas, 
    .print-qrcode-container img:not(.qr-logo) {
        width: 200px !important;
        height: 200px !important;
    }
}

/* Footer Styling */
footer {
    text-align: center;
    padding: 30px;
    margin-top: auto;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
}
