/* Modern Light/Dark Theme CSS for CRUD Application */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Theme Colors (Default) */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #f8fafc;
    --bg-secondary: #f1f5f9;
    --card-bg: #ffffff;
    --card-hover: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.2);
}

/* Dark Theme Colors */
body.dark-mode {
    --primary-color: #818cf8;
    --primary-dark: #6366f1;
    --primary-light: #a5b4fc;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #0f172a;
    --bg-secondary: #1e293b;
    --card-bg: #1e293b;
    --card-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --border-hover: #475569;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 20px rgba(129, 140, 248, 0.3);
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    font-size: 16px;
    font-weight: 400;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #cbd5e1 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.7;
    animation: fadeInBody 0.8s ease-in;
    transition: background 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.dark-mode {
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
}

@keyframes fadeInBody {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Animated Background Particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(129, 140, 248, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    animation: particleMove 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.3s ease;
}

body.dark-mode::before {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(129, 140, 248, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
}

@keyframes particleMove {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-20px, -20px) scale(1.1);
    }
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 0, 0, 0.5);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    border: 1px solid var(--border-color);
    animation: slideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(129, 140, 248, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-card h1 {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
    from {
        filter: brightness(1);
    }
    to {
        filter: brightness(1.2);
    }
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 16px;
    font-weight: 500;
}

.auth-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out backwards;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    color: var(--text-secondary);
}

.password-toggle:hover {
    background: var(--card-hover);
    transform: scale(1.1);
    color: var(--primary-color);
}

.password-toggle:active {
    transform: scale(0.95);
}

.password-toggle .eye-icon {
    font-size: 18px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.password-toggle:hover .eye-icon {
    transform: scale(1.2);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.2), 0 0 20px rgba(129, 140, 248, 0.1);
    transform: translateY(-2px);
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(129, 140, 248, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(129, 140, 248, 0.5);
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
}

.alert {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 500;
    animation: slideInRight 0.5s ease-out;
    border-left: 4px solid;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-color: var(--danger-color);
}

body.dark-mode .alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-color: var(--success-color);
}

body.dark-mode .alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
}

.auth-link {
    text-align: center;
    margin-top: 24px;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
}

.auth-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-link a:hover {
    text-decoration: underline;
    color: var(--primary-light);
}

/* Dashboard */
.dashboard-container {
    min-height: 100vh;
    background: var(--bg-color);
    position: relative;
    z-index: 1;
}

.dashboard-header {
    background: var(--card-bg);
    box-shadow: var(--shadow);
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    animation: slideDown 0.5s ease-out;
    transition: background 0.3s ease, border-color 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header h1 {
    color: var(--text-primary);
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.user-badge-client {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

body.dark-mode .user-badge-client {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.user-badge-staff {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

body.dark-mode .user-badge-staff {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.user-badge-manager {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

body.dark-mode .user-badge-manager {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.username {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 16px;
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.theme-toggle:hover::before {
    width: 100px;
    height: 100px;
}

.theme-toggle:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.theme-toggle:active {
    transform: translateY(0) scale(0.95);
}

.theme-icon {
    font-size: 22px;
    transition: transform 0.3s ease;
    z-index: 1;
    position: relative;
}

.theme-toggle:hover .theme-icon {
    transform: rotate(15deg) scale(1.1);
}

.dashboard-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
    animation: fadeInUp 0.6s ease-out;
}

.dashboard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.dashboard-actions .btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-actions .btn-primary span {
    font-size: 20px;
    animation: rotateIn 0.5s ease-out;
}

@keyframes rotateIn {
    from {
        transform: rotate(-180deg);
        opacity: 0;
    }
    to {
        transform: rotate(0);
        opacity: 1;
    }
}

.filters {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-form {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-input {
    padding: 12px 18px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    width: 250px;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.2);
    transform: scale(1.02);
}

.filter-select {
    padding: 12px 18px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.2);
}

.records-table-container {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    animation: scaleIn 0.5s ease-out;
    transition: background 0.3s ease, border-color 0.3s ease;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.records-table {
    width: 100%;
    border-collapse: collapse;
}

.records-table thead {
    background: var(--bg-secondary);
}

.records-table th {
    padding: 18px;
    text-align: left;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--border-color);
}

.records-table td {
    padding: 18px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
}

.records-table tbody tr {
    transition: all 0.3s ease;
    animation: fadeInRow 0.5s ease-out backwards;
}

.records-table tbody tr:nth-child(1) { animation-delay: 0.1s; }
.records-table tbody tr:nth-child(2) { animation-delay: 0.2s; }
.records-table tbody tr:nth-child(3) { animation-delay: 0.3s; }
.records-table tbody tr:nth-child(4) { animation-delay: 0.4s; }
.records-table tbody tr:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInRow {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.records-table tbody tr:hover {
    background: var(--card-hover);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.type-badge {
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    animation: bounceIn 0.5s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.type-badge-client {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

body.dark-mode .type-badge-client {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.type-badge-staff {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

body.dark-mode .type-badge-staff {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.type-badge-manager {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

body.dark-mode .type-badge-manager {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Product Type Badges */
.type-badge-fries {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

body.dark-mode .type-badge-fries {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.type-badge-burger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

body.dark-mode .type-badge-burger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.type-badge-hotdog-sandwich {
    background: #fce7f3;
    color: #9f1239;
    border: 1px solid #f9a8d4;
}

body.dark-mode .type-badge-hotdog-sandwich {
    background: rgba(236, 72, 153, 0.2);
    color: #f9a8d4;
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.type-badge-pasta {
    background: #fef3c7;
    color: #78350f;
    border: 1px solid #fbbf24;
}

body.dark-mode .type-badge-pasta {
    background: rgba(217, 119, 6, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(217, 119, 6, 0.3);
}

.type-badge-drinks {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

body.dark-mode .type-badge-drinks {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.type-badge-hot-coffee {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

body.dark-mode .type-badge-hot-coffee {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.type-badge-iced-coffee {
    background: #dbeafe;
    color: #1e3a8a;
    border: 1px solid #60a5fa;
}

body.dark-mode .type-badge-iced-coffee {
    background: rgba(37, 99, 235, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(37, 99, 235, 0.3);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.product-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out backwards;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.5s ease;
}

.product-card:hover::before {
    left: 100%;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--primary-color);
}

.product-type-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-name {
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 900;
    margin: 6px 0 10px 0;
    /* Avoid overlapping with type badge on the top-right */
    padding-right: 90px;
    line-height: 1.3;
}

.product-flavor {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 6px 0 0 0;
    font-weight: 500;
}

/* Flavor highlight pill (used in customer dashboard) */
.flavor-pill {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: var(--primary-dark);
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.22);
    line-height: 1;
    white-space: nowrap;
}

body.dark-mode .flavor-pill {
    color: #c7d2fe;
    background: rgba(129, 140, 248, 0.18);
    border: 1px solid rgba(129, 140, 248, 0.3);
}

.product-price {
    color: var(--primary-color);
    font-size: 28px;
    font-weight: 800;
    margin-top: 16px;
    letter-spacing: -0.5px;
}

.product-quantity-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.quantity-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

.quantity-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--success-color);
}

.quantity-value.low-stock {
    color: var(--danger-color);
}

.quantity-badge {
    padding: 4px 12px;
    background: var(--success-color);
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.quantity-badge.low-stock {
    background: var(--danger-color);
}

.purchase-controls-wrapper {
    margin-top: 16px;
    padding-top: 16px;
    padding-left: 6px;
    padding-right: 6px;
    border-top: 1px solid var(--border-color);
    display: block;
}

.purchase-form {
    margin: 0;
    padding: 0;
    border: none;
}

.purchase-controls {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: nowrap;
}

.purchase-controls .btn {
    white-space: nowrap;
    flex: 0 0 auto;
    width: max-content;
}

/* Make product-card action row more compact so it doesn't overflow small cards */
.purchase-controls .btn-sm {
    padding: 10px 14px;
    font-size: 13px;
}

.purchase-controls label {
    font-size: 13px;
}

.purchase-controls .quantity-input {
    width: 62px;
    padding: 7px 10px;
    font-size: 13px;
}

.purchase-controls label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.quantity-input {
    width: 70px;
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    background: var(--card-bg);
    color: var(--text-primary);
    text-align: center;
}

.quantity-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-purchase {
    flex: 1;
    min-width: 100px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 700;
}

.out-of-stock {
    margin-top: 16px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid var(--danger-color);
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Sidebar Navigation */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--card-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    order: 0;
}

.sidebar-header h2 {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 4px 0;
    color: white;
}

.sidebar-subtitle {
    font-size: 13px;
    opacity: 0.9;
    margin: 0;
    font-weight: 500;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
    order: 2;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    gap: 12px;
    font-weight: 500;
    font-size: 15px;
}

.nav-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding-left: 24px;
}

.nav-item.active {
    background: var(--bg-secondary);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
    font-weight: 600;
}

.nav-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.nav-text {
    flex: 1;
}

.nav-badge {
    background: var(--danger-color);
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.sidebar-top {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    order: 1;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    margin-top: auto;
    order: 3;
}

/* Content Navigation Links (in main body) */
.content-nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.content-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.content-nav-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.content-nav-item.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-dark);
    font-weight: 600;
}

.content-nav-item .nav-icon {
    font-size: 18px;
}

.content-nav-item .nav-badge {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.user-profile-sidebar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--card-bg);
    border-radius: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.user-details {
    flex: 1;
}

.user-name-sidebar {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    margin: 0;
}

.user-role-sidebar {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 2px 0 0 0;
}

.sidebar-theme-toggle {
    width: 100%;
    margin-bottom: 12px;
}

.logout-item {
    color: var(--danger-color);
}

.logout-item:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.main-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
    background: var(--bg-color);
}

/* Activity Log Styles */
.activity-log-container {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 30px;
    border: 1px solid var(--border-color);
}

.activity-log-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.activity-log-header h2 {
    color: var(--text-primary);
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.activity-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    margin: 0;
}

.activity-log-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-log-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease-out backwards;
}

.activity-log-item:nth-child(1) { animation-delay: 0.1s; }
.activity-log-item:nth-child(2) { animation-delay: 0.2s; }
.activity-log-item:nth-child(3) { animation-delay: 0.3s; }
.activity-log-item:nth-child(4) { animation-delay: 0.4s; }
.activity-log-item:nth-child(5) { animation-delay: 0.5s; }

.activity-log-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.activity-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border-radius: 12px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.activity-user {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 16px;
}

.activity-type {
    padding: 4px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.activity-description {
    color: var(--text-secondary);
    font-size: 15px;
    margin: 8px 0;
    line-height: 1.6;
}

.activity-meta {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.activity-time {
    font-weight: 600;
}

.activity-ip {
    font-family: monospace;
    opacity: 0.8;
}

/* Responsive Sidebar */
@media (max-width: 1024px) {
    .sidebar {
        width: 260px;
    }
    
    .main-content {
        margin-left: 260px;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 101;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    font-size: 20px;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Settings Page Styles */
.settings-container {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 30px;
    border: 1px solid var(--border-color);
}

.settings-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.settings-header h2 {
    color: var(--text-primary);
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.settings-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    margin: 0;
}

.settings-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.settings-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

.settings-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.settings-card-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.settings-icon {
    font-size: 24px;
}

.settings-card-body {
    padding: 24px;
}

.settings-field {
    margin-bottom: 24px;
}

.settings-field:last-child {
    margin-bottom: 0;
}

.settings-form {
    margin-top: 8px;
}

.settings-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    background: var(--card-bg);
    color: var(--text-primary);
    transition: all 0.3s ease;
    margin-top: 8px;
}

.settings-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.settings-hint {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 8px 0 0 0;
    font-style: italic;
}

.settings-field label {
    display: block;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.settings-value {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.value-text {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    flex: 1;
}

.value-badge {
    padding: 4px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge {
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.status-approved {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

body.dark-mode .status-approved {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-declined {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

body.dark-mode .status-declined {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

body.dark-mode .status-pending {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Users Tabs */
.users-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    padding: 0;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    padding: 8px;
}

.users-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    flex: 1;
    justify-content: center;
}

.users-tab:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.users-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-dark);
    font-weight: 600;
}

.tab-icon {
    font-size: 18px;
}

.tab-badge {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.users-tab:not(.active) .tab-badge {
    background: var(--primary-color);
    color: white;
}

.type-badge-seller {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

body.dark-mode .type-badge-seller {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.type-badge-customer {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

body.dark-mode .type-badge-customer {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        transition: transform 0.3s ease;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar.open ~ .sidebar-overlay {
        display: block;
        opacity: 1;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .dashboard-header {
        padding-left: 60px;
    }
    
    .settings-content {
        grid-template-columns: 1fr;
    }
}

.actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
}

.btn-edit:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: rotate(15deg) scale(1.1);
}

.btn-read:hover {
    background: rgba(129, 140, 248, 0.2);
    transform: scale(1.1);
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: rotate(-15deg) scale(1.1);
}

.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
    align-items: center;
    justify-content: center;
}

.modal[style*="display: flex"],
.modal.show {
    display: flex !important;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border: 1px solid var(--border-color);
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
}

.modal-header h2 {
    color: var(--text-primary);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.close {
    color: var(--text-secondary);
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: var(--text-primary);
    background: var(--card-hover);
    transform: rotate(90deg);
}

.modal form {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

/* Delete Confirmation Modal */
.delete-modal .modal-content {
    max-width: 400px;
}

.delete-modal-icon {
    font-size: 64px;
    text-align: center;
    margin: 20px 0;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.delete-modal-message {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
}

.delete-modal-details {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 14px;
}

.delete-modal-footer {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 0 24px 24px;
}

/* Read Modal Styles */
.read-modal-content {
    max-width: 800px;
}

.read-modal-header {
    padding: 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--card-bg) 100%);
    position: relative;
    overflow: hidden;
}

.read-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light), var(--primary-color));
    animation: shimmer 3s infinite;
}

.read-header-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(129, 140, 248, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

.read-icon-large {
    font-size: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.read-header-text {
    flex: 1;
}

.read-header-text h2 {
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0 0 6px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.read-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

.read-modal-body {
    padding: 30px;
}

.read-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.read-info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.5s ease-out backwards;
    position: relative;
    overflow: hidden;
}

.read-info-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(129, 140, 248, 0.1), transparent);
    transition: left 0.5s ease;
}

.read-info-item:hover::before {
    left: 100%;
}

.read-info-item:nth-child(1) { animation-delay: 0.1s; }
.read-info-item:nth-child(2) { animation-delay: 0.2s; }
.read-info-item:nth-child(3) { animation-delay: 0.3s; }
.read-info-item:nth-child(4) { animation-delay: 0.4s; }
.read-info-item:nth-child(5) { animation-delay: 0.5s; }
.read-info-item:nth-child(6) { animation-delay: 0.6s; }
.read-info-item:nth-child(7) { animation-delay: 0.7s; }
.read-info-item:nth-child(8) { animation-delay: 0.8s; }

.read-info-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 20px rgba(129, 140, 248, 0.2);
    border-color: var(--primary-color);
}

.read-info-highlight {
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.1), rgba(99, 102, 241, 0.1));
    border-color: var(--primary-color);
}

.read-info-type {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
}

.read-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.3);
    transition: all 0.3s ease;
}

.read-info-item:hover .read-icon-wrapper {
    transform: rotate(5deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(129, 140, 248, 0.5);
}

.read-icon {
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.read-info-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.read-label {
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
    margin-bottom: 6px;
}

.read-value {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    word-break: break-word;
    line-height: 1.6;
}

.read-info-full {
    grid-column: 1 / -1;
}

.read-info-full .read-value {
    font-size: 15px;
    line-height: 1.6;
}

.read-modal-footer {
    display: flex;
    justify-content: center;
    padding-top: 24px;
    border-top: 2px solid var(--border-color);
    margin-top: 30px;
}

.read-modal-footer .btn {
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.read-modal-footer .btn span {
    font-size: 18px;
}

@media (max-width: 768px) {
    .read-modal-header {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }

    .read-header-icon {
        width: 50px;
        height: 50px;
    }

    .read-icon-large {
        font-size: 28px;
    }

    .read-info-grid {
        grid-template-columns: 1fr;
    }
    
    .read-info-full {
        grid-column: 1;
    }

    .read-info-item {
        padding: 16px;
    }

    .read-icon-wrapper {
        width: 40px;
        height: 40px;
    }

    .read-icon {
        font-size: 20px;
    }
}

/* Profile Card */
.profile-card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 24px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    animation: slideDown 0.5s ease-out;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.profile-header h2 {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin: 0;
}

.profile-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.profile-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-label {
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
}

.profile-value {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-card {
        padding: 30px 20px;
    }

    .header-content {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .profile-info {
        grid-template-columns: 1fr;
    }

    .dashboard-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-actions {
        flex-direction: column;
    }

    .cart-actions .btn {
        width: 100%;
    }

    .purchase-controls-wrapper {
        gap: 12px;
        flex-direction: column;
        align-items: stretch;
    }

    .purchase-controls {
        flex-wrap: wrap;
    }

    .purchase-controls .btn {
        width: 100%;
    }

    .filter-form {
        flex-direction: column;
        width: 100%;
    }

    .search-input {
        width: 100%;
    }

    .records-table-container {
        overflow-x: auto;
    }

    .records-table {
        min-width: 800px;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

/* Cart Styles */
.cart-container {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.cart-items {
    margin-top: 20px;
}

.cart-product-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-product-info .type-badge {
    align-self: flex-start;
    font-size: 11px;
    padding: 5px 12px;
}

.cart-product-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
}

.quantity-input-small {
    width: 60px;
    padding: 6px 10px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.quantity-input-small:focus {
    outline: none;
    border-color: var(--primary-color);
}

.cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 2px solid var(--border-color);
    gap: 16px;
    flex-wrap: wrap;
}

.cart-actions .btn-lg {
    padding: 14px 28px;
    font-size: 18px;
    font-weight: 700;
}

.records-table tfoot {
    background: var(--bg-secondary);
    border-top: 2px solid var(--border-color);
}

.records-table tfoot td {
    padding: 20px 16px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}
