@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #10b981;
    --background: #0f172a;
    --surface: rgba(30, 41, 59, 0.7);
    --surface-light: rgba(255, 255, 255, 0.05);
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --glass-bg: rgba(30, 41, 59, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--background);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 40%);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Glassmorphism Cards */
.card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 48px 0 rgba(0, 0, 0, 0.4);
}

/* Navigation */
nav {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    font-size: 0.9rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    filter: brightness(1.1);
}

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

.btn-outline:hover {
    background: var(--surface-light);
    border-color: var(--primary-light);
}

.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;
}

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

label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.9rem;
}

input, select, textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    outline: none;
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: rgba(15, 23, 42, 0.8);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Receipt Paper Styles */
.receipt-paper {
    background: white;
    color: #1e293b;
    padding: 3rem;
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    max-width: 800px;
    margin: 2rem auto;
    min-height: 1000px;
    position: relative;
    overflow: hidden;
}

.receipt-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.receipt-table th {
    text-align: left;
    background: #f8fafc;
    padding: 1rem;
    color: #64748b;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.receipt-table td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.receipt-totals {
    margin-left: auto;
    width: 300px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.total-row.grand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-dark);
    border-top: 2px solid #f1f5f9;
    margin-top: 1rem;
    padding-top: 1rem;
}

/* Watermark */
.watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.12;
    width: 450px;
    height: auto;
    pointer-events: none;
    z-index: 0;
}

.receipt-paper {
    position: relative;
    overflow: hidden;
}

.receipt-header, .receipt-table, .receipt-totals, .receipt-footer {
    position: relative;
    z-index: 1;
}

/* Responsive Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--surface), rgba(30, 41, 59, 0.4));
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.icon-box {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.icon-blue { background: linear-gradient(135deg, #6366f1, #4f46e5); color: white; }
.icon-pink { background: linear-gradient(135deg, #ec4899, #be185d); color: white; }
.icon-green { background: linear-gradient(135deg, #10b981, #059669); color: white; }

/* Responsive Adjustments */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .container { padding: 1rem; }
    .receipt-paper { padding: 1.5rem; }
    .receipt-header { flex-direction: column; gap: 1.5rem; }
}

@media print {
    @page {
        size: A4;
        margin: 0;
    }
    
    body {
        background: white !important;
        margin: 0;
        padding: 0;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    nav, .btn, .no-print, .animate-fade > div:first-child {
        display: none !important;
    }

    .container {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
    }

    .receipt-paper {
        box-shadow: none !important;
        margin: 0 auto !important;
        width: 210mm !important; /* A4 width */
        min-height: 297mm !important; /* A4 height */
        padding: 20mm !important;
        border: none !important;
        position: relative;
        background: white !important;
        transform: scale(0.98);
        transform-origin: top center;
    }

    .receipt-header, .receipt-table, .receipt-totals, .receipt-footer {
        break-inside: avoid;
    }

    /* Force colorful accents to show in print */
    .receipt-header h1 { color: #4f46e5 !important; }
    .receipt-totals .grand { background: #f8fafc !important; -webkit-print-color-adjust: exact; }
    .receipt-table th { background: #f1f5f9 !important; color: #1e293b !important; -webkit-print-color-adjust: exact; }
}
