/* Modern Stationery Shop Management System - CSS */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Modern Color Palette */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --warning-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --info-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --danger-gradient: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    
    /* Background Colors */
    --bg-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-surface: rgba(255, 255, 255, 0.95);
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-overlay: rgba(0, 0, 0, 0.1);
    
    /* Text Colors */
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --text-muted: #a0aec0;
    --text-white: #ffffff;
    
    /* Border Colors */
    --border-light: rgba(255, 255, 255, 0.2);
    --border-medium: #e2e8f0;
    --border-dark: #cbd5e0;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.2);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }
h5 { font-size: 1.125rem; font-weight: 600; }
h6 { font-size: 1rem; font-weight: 600; }

p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    background: var(--bg-surface);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.sidebar.close {
    width: 80px;
}



.sidebar .logo-details {
    height: 80px;
    display: flex;
    align-items: center;
    padding: 0 var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-surface);
}

.sidebar .logo-details i {
    font-size: 2rem;
    color: var(--text-primary);
    min-width: 80px;
    text-align: center;
}

.sidebar .logo-details .logo-img {
    height: 40px;
    width: 40px;
    border-radius: var(--radius-md);
    object-fit: cover;
    margin-right: var(--spacing-sm);
}

.sidebar .logo-details .logo_name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: normal;
    line-height: 1.2;
    word-wrap: break-word;
    max-width: 200px;
}

.sidebar .nav-links {
    padding: var(--spacing-md) 0;
}

.sidebar .nav-links li {
    list-style: none;
    margin-bottom: var(--spacing-xs);
}

.sidebar .nav-links li a {
    display: flex;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    margin: 0 var(--spacing-sm);
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar .nav-links li a:hover,
.sidebar .nav-links li.active a {
    background: var(--primary-gradient);
    color: var(--text-white);
    transform: translateX(4px);
}

.sidebar .nav-links li i {
    min-width: 80px;
    text-align: center;
    font-size: 1.25rem;
    margin-right: var(--spacing-sm);
}

.sidebar .nav-links li a .link_name {
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    transition: all 0.3s ease;
    padding: var(--spacing-lg);
}

.sidebar.close ~ .main-content {
    margin-left: 80px;
}

/* Top Navigation */
.topbar {
    background: var(--bg-surface);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    padding: var(--spacing-md) var(--spacing-lg);
    margin: calc(-1 * var(--spacing-lg)) calc(-1 * var(--spacing-lg)) var(--spacing-lg);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.topbar .navbar-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: var(--bg-overlay);
    transform: scale(1.1);
}

/* Cards */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    overflow: hidden;
}

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

.card-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-light);
    padding: var(--spacing-md) var(--spacing-lg);
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: var(--spacing-lg);
}

/* Modern Buttons */
.btn {
    font-family: var(--font-primary);
    font-weight: 500;
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.9rem;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-white);
    text-align: center;
}

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

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

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

.btn-info {
    background: var(--info-gradient);
    color: var(--text-white);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--text-white);
    text-decoration: none;
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.8rem;
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 1rem;
}

/* Form Elements */
.form-control, .form-select {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-primary);
    font-family: var(--font-primary);
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text-primary);
}

.table th {
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-weight: 600;
    padding: var(--spacing-md);
    text-align: left;
    border-bottom: 2px solid var(--border-medium);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: var(--bg-overlay);
    transition: background 0.2s ease;
}

/* Status Badges */
.badge {
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.bg-success {
    background: var(--success-gradient) !important;
    color: var(--text-white);
}

.badge.bg-warning {
    background: var(--warning-gradient) !important;
    color: var(--text-white);
}

.badge.bg-danger {
    background: var(--danger-gradient) !important;
    color: var(--text-white);
}

.badge.bg-info {
    background: var(--info-gradient) !important;
    color: var(--text-white);
}

.badge.bg-primary {
    background: var(--primary-gradient) !important;
    color: var(--text-white);
}

.badge.bg-secondary {
    background: var(--text-secondary) !important;
    color: var(--text-white);
}

/* Modals */
.modal-content {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 1px solid var(--border-light);
    padding: var(--spacing-lg);
}

.modal-body {
    padding: var(--spacing-lg);
}

.modal-footer {
    border-top: 1px solid var(--border-light);
    padding: var(--spacing-lg);
}

/* Alerts */
.alert {
    border-radius: var(--radius-md);
    border: none;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    font-weight: 500;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #166534;
    border-left: 4px solid #22c55e;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

/* Statistics Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--text-white);
    margin-bottom: var(--spacing-md);
}

.stat-icon.primary { background: var(--primary-gradient); }
.stat-icon.success { background: var(--success-gradient); }
.stat-icon.warning { background: var(--warning-gradient); }
.stat-icon.info { background: var(--info-gradient); }

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    font-family: var(--font-heading);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: var(--spacing-xs);
}

/* Content Sections */
.content-section {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-lg);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--border-light);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    font-family: var(--font-heading);
}

.section-action {
    background: var(--primary-gradient);
    color: var(--text-white);
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.section-action:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--text-white);
    text-decoration: none;
}

/* Modern Table */
.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.modern-table th {
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-weight: 600;
    padding: var(--spacing-md);
    text-align: left;
    border-bottom: 2px solid var(--border-medium);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-table td {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    vertical-align: middle;
}

.modern-table tbody tr:hover {
    background: var(--bg-overlay);
    transition: background 0.2s ease;
}

/* Project ID Styling */
.project-id {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #667eea;
    background: var(--bg-surface);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.amount-value {
    font-weight: 700;
    color: #38a169;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: var(--spacing-md);
    }
    
    .sidebar.active ~ .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .stat-card {
        padding: var(--spacing-md);
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .section-header {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: flex-start;
    }
}

/* Dropdown Fix */
.dropdown-menu {
    z-index: 999999 !important;
    position: absolute !important;
    top: 100% !important;
    left: auto !important;
    right: 0 !important;
    min-width: 200px !important;
    margin-top: 0.125rem !important;
    background-color: #fff !important;
    border: 1px solid rgba(0,0,0,.15) !important;
    border-radius: 0.375rem !important;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.175) !important;
}

.dropdown {
    position: relative;
    z-index: 999999;
}

.topbar {
    z-index: 1000;
}

.main-content {
    z-index: 1;
}

/* Footer */
.footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
    margin-top: auto;
    color: var(--text-primary);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.p-0 { padding: 0; }
.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

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

/* POS Amount Displays */
.change-display,
.total-display {
    background: var(--bg-surface);
    border: 2px solid var(--border-medium);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.total-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

.change-amount,
.total-amount {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.total-amount {
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.change-amount {
    color: var(--text-primary);
}

.change-amount:not(:empty) {
    color: #22c55e;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Print Styles */
@media print {
    .sidebar, .topbar, .btn, .section-action {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}