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

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

:root {
    /* צבעים ראשיים - גרסה עדינה יותר */
    --primary-color: #FB923C;
    --primary-gradient: linear-gradient(135deg, #FB923C 0%, #F97316 100%);
    --accent-color: #22C55E;
    --accent-gradient: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
    --destructive-color: #EF4444;
    --destructive-gradient: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    
    /* צבעי רקע - Light Mode */
    --background: hsl(30, 25%, 98%);
    --card-background: hsl(0, 0%, 100%);
    --secondary-background: hsl(30, 20%, 94%);
    --muted-background: hsl(30, 15%, 92%);
    
    /* צבעי טקסט - Light Mode */
    --foreground: hsl(25, 30%, 15%);
    --muted-foreground: hsl(25, 15%, 45%);
    
    /* צבעי קטגוריות - עדינים יותר */
    --category-food: #FB923C;
    --category-drinks: #0EA5E9;
    --category-equipment: #A855F7;
    --category-roles: #22C55E;
    --category-other: hsl(25, 15%, 45%);
    
    /* צבעי סטטוס */
    --status-available: #22C55E;
    --status-partial: #EAB308;
    --status-full: hsl(25, 15%, 45%);
    
    /* צלליים חמים */
    --shadow-soft: 0 1px 2px 0 hsl(25 30% 15% / 0.05);
    --shadow-medium: 0 4px 6px -1px hsl(25 30% 15% / 0.08), 0 2px 4px -2px hsl(25 30% 15% / 0.05);
    --shadow-strong: 0 10px 15px -3px hsl(25 30% 15% / 0.1), 0 4px 6px -4px hsl(25 30% 15% / 0.05);
    
    /* מרווחים ועיגולים */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1rem;
    --radius-xl: 1rem;
    --radius-pill: 9999px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    /* צבעי רקע - Dark Mode */
    --background: hsl(25, 15%, 8%);
    --card-background: hsl(25, 10%, 12%);
    --secondary-background: hsl(25, 8%, 16%);
    --muted-background: hsl(25, 6%, 20%);
    
    /* צבעי טקסט - Dark Mode */
    --foreground: hsl(30, 20%, 92%);
    --muted-foreground: hsl(25, 10%, 65%);
    
    /* צבעי סטטוס מותאמים לדארק מוד */
    --status-full: hsl(25, 10%, 55%);
    --category-other: hsl(25, 10%, 65%);
    
    /* צלליים כהים */
    --shadow-soft: 0 1px 2px 0 hsl(0 0% 0% / 0.2);
    --shadow-medium: 0 4px 6px -1px hsl(0 0% 0% / 0.3), 0 2px 4px -2px hsl(0 0% 0% / 0.2);
    --shadow-strong: 0 10px 15px -3px hsl(0 0% 0% / 0.4), 0 4px 6px -4px hsl(0 0% 0% / 0.3);
}

/* Auto Dark Mode based on system preference */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        /* צבעי רקע - Dark Mode */
        --background: hsl(25, 15%, 8%);
        --card-background: hsl(25, 10%, 12%);
        --secondary-background: hsl(25, 8%, 16%);
        --muted-background: hsl(25, 6%, 20%);
        
        /* צבעי טקסט - Dark Mode */
        --foreground: hsl(30, 20%, 92%);
        --muted-foreground: hsl(25, 10%, 65%);
        
        /* צבעי סטטוס מותאמים לדארק מוד */
        --status-full: hsl(25, 10%, 55%);
        --category-other: hsl(25, 10%, 65%);
        
        /* צלליים כהים */
        --shadow-soft: 0 1px 2px 0 hsl(0 0% 0% / 0.2);
        --shadow-medium: 0 4px 6px -1px hsl(0 0% 0% / 0.3), 0 2px 4px -2px hsl(0 0% 0% / 0.2);
        --shadow-strong: 0 10px 15px -3px hsl(0 0% 0% / 0.4), 0 4px 6px -4px hsl(0 0% 0% / 0.3);
    }
}

body {
    font-family: 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    background-image: 
        radial-gradient(circle at 20% 20%, hsl(24 85% 60% / 0.04) 288px, transparent 288px),
        radial-gradient(circle at 80% 80%, hsl(160 60% 45% / 0.04) 384px, transparent 384px);
    min-height: 100vh;
    padding: 1rem;
    direction: rtl;
    color: var(--foreground);
    line-height: 1.6;
    font-weight: 400;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 2.5rem;
}

header h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 0.75rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--muted-foreground);
    font-weight: 500;
    margin-bottom: 1rem;
}

/* Card Styles */
.card {
    background: var(--card-background);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-medium);
    margin-bottom: 1.5rem;
    border: 1px solid hsl(30, 15%, 92%);
    transition: all 0.3s ease;
    animation: fadeIn 0.3s ease;
}

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

.card h2 {
    color: var(--foreground);
    margin-bottom: 1.5rem;
    font-size: 1.875rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card h2::before {
    content: "✨";
    font-size: 1.5rem;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--foreground);
    font-size: 1rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid hsl(30, 15%, 92%);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: 'Heebo', sans-serif;
    transition: all 0.3s ease;
    background: var(--card-background);
    color: var(--foreground);
    min-height: 48px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px hsl(24 95% 53% / 0.1);
    transform: translateY(-1px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--muted-foreground);
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Heebo', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 140px;
    min-height: 48px;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

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

.btn-secondary:hover {
    background: hsl(25, 20%, 35%);
    transform: translateY(-1px);
}

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

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

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

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

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

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

/* Category Styles */
.category-section {
    margin-bottom: 2.5rem;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* Item Cards */
.items-grid {
    display: grid;
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.item-card {
    background: var(--card-background);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    border: 2px solid hsl(30, 15%, 92%);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.4s ease;
}

.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-gradient);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.item-card:hover::before {
    transform: scaleY(1);
}

.item-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

.item-card.full {
    background: var(--muted-background);
    cursor: not-allowed;
    opacity: 0.7;
}

.item-card.full::before {
    background: var(--muted-foreground);
}

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

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.item-title {
    font-weight: 600;
    color: var(--foreground);
    font-size: 1.125rem;
}

.item-status {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-available {
    background: hsl(160 60% 45% / 0.15);
    color: var(--status-available);
    border: 1px solid hsl(160 60% 45% / 0.3);
}

.status-partial {
    background: hsl(45 93% 47% / 0.15);
    color: var(--status-partial);
    border: 1px solid hsl(45 93% 47% / 0.3);
}

.status-full {
    background: hsl(25 15% 45% / 0.15);
    color: var(--status-full);
    border: 1px solid hsl(25 15% 45% / 0.3);
}

.item-category {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.item-notes {
    font-size: 0.9rem;
    color: var(--muted-foreground);
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Event Header */
.event-header {
    background: var(--primary-gradient);
    color: white;
    padding: 2rem;
    border-radius: var(--radius-xl);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.event-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.event-header h1 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    font-weight: 800;
}

.event-details {
    position: relative;
    z-index: 1;
}

.event-details p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
    font-weight: 500;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--card-background);
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-medium);
    border: 1px solid hsl(30, 15%, 92%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: scaleIn 0.2s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.stat-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-strong);
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-number {
    transform: scale(1.1);
}

.stat-label {
    color: var(--muted-foreground);
    font-size: 0.95rem;
    font-weight: 600;
}

/* Link Display */
.link-box {
    background: var(--secondary-background);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid hsl(30, 15%, 92%);
    animation: fadeIn 0.3s ease;
}

.admin-box {
    background: hsl(45, 100%, 96%);
    border: 1px solid hsl(45, 93%, 47%);
}

.link-box h3 {
    color: var(--foreground);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.help-text {
    color: var(--muted-foreground);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.help-text.warning {
    color: hsl(45, 70%, 35%);
    font-weight: 600;
}

.link-display {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.link-display input {
    flex: 1;
    background: var(--card-background);
    border: 1px solid hsl(30, 15%, 92%);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
}

/* Messages */
.success-message {
    background: hsl(160 60% 45% / 0.15);
    color: hsl(160, 70%, 25%);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin: 1rem 0;
    border: 1px solid hsl(160 60% 45% / 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    animation: bounceSubtle 0.5s ease;
}

.success-message::before {
    content: "✅";
    font-size: 1.25rem;
}

.error-message {
    background: hsl(0 84% 60% / 0.15);
    color: hsl(0, 70%, 35%);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin: 1rem 0;
    border: 1px solid hsl(0 84% 60% / 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    animation: bounceSubtle 0.5s ease;
}

.error-message::before {
    content: "❌";
    font-size: 1.25rem;
}

@keyframes bounceSubtle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--card-background);
    border-radius: var(--radius-xl);
    padding: 2rem;
    max-width: 600px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-strong);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid hsl(30, 15%, 92%);
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--muted-foreground);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--muted-background);
    color: var(--foreground);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid hsl(30, 15%, 92%);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Checkbox Styles */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--secondary-background);
    border-radius: var(--radius-md);
    border: 1px solid hsl(30, 15%, 92%);
    transition: all 0.3s ease;
}

.checkbox-group:hover {
    background: var(--muted-background);
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--primary-color);
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    color: var(--foreground);
}

/* Add Item Section - Modern Design */
.add-item-section {
    background: var(--primary-gradient);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    margin: 2rem 0;
    color: white;
    box-shadow: var(--shadow-strong);
    position: relative;
    overflow: hidden;
}

.add-item-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 8s ease-in-out infinite;
}

.add-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.add-item-header h2 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    color: white;
}

.add-item-icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    animation: float 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

.add-item-icon:hover {
    transform: scale(1.1) rotate(180deg);
    background: rgba(255,255,255,0.3);
}

.add-item-form {
    position: relative;
    z-index: 1;
}

.form-row-modern {
    display: grid;
    grid-template-columns: 2fr 1.2fr 140px;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    align-items: end;
}

.form-row-modern:last-child {
    grid-template-columns: 1fr auto;
    margin-bottom: 0;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 600;
    font-size: 0.95rem;
    color: white;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.input-group input,
.select-wrapper select {
    padding: 1rem 1.25rem;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,0.15);
    color: white;
    font-size: 1rem;
    font-family: 'Heebo', sans-serif;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    height: 60px;
    box-sizing: border-box;
}

.input-group input::placeholder {
    color: rgba(255,255,255,0.8);
}

.input-group input:focus,
.select-wrapper select:focus {
    outline: none;
    border-color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.25);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.1);
}

/* Custom Dropdown Styles */
.select-wrapper {
    position: relative;
    width: 100%;
}

.custom-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-lg);
    color: white;
    font-size: 1rem;
    font-family: 'Heebo', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    height: 60px;
    box-sizing: border-box;
    user-select: none;
}

.dropdown-selected:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.4);
    transform: translateY(-1px);
}

.dropdown-selected.active {
    border-color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.25);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.1);
}

.dropdown-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.dropdown-arrow {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    color: rgba(255,255,255,0.8);
}

.dropdown-selected.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-background);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-strong);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 0.25rem;
    border: 1px solid hsl(30, 15%, 92%);
    overflow: hidden;
}

.dropdown-options.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    color: var(--foreground);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px solid hsl(30, 15%, 92%);
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option:hover {
    background: var(--secondary-background);
    color: var(--primary-color);
    transform: translateX(4px);
}

.dropdown-option.selected {
    background: var(--primary-gradient);
    color: white;
}

.dropdown-option.selected:hover {
    background: linear-gradient(135deg, #EA580C 0%, #DC2626 100%);
    transform: translateX(0);
}

/* Fallback for native select (hidden) */
.select-wrapper select {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

.quantity-group {
    min-width: 140px;
}

/* Enhanced Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-lg);
    border: 2px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    overflow: hidden;
    height: 60px;
    transition: all 0.3s ease;
}

.quantity-controls:hover {
    border-color: rgba(255,255,255,0.4);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.quantity-btn {
    width: 50px;
    height: 60px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.quantity-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.05);
    box-shadow: inset 0 0 20px rgba(255,255,255,0.2);
}

.quantity-btn:active {
    transform: scale(0.95);
    background: rgba(255,255,255,0.3);
}

.quantity-controls input {
    flex: 1;
    text-align: center;
    border: none;
    background: transparent;
    padding: 0;
    font-weight: 800;
    font-size: 1.5rem;
    font-family: 'Heebo', sans-serif;
    color: white;
    min-width: 40px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.notes-group {
    flex: 1;
}

.submit-group {
    display: flex;
    align-items: end;
}

/* Enhanced Add Item Button */
.btn-add-item {
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Heebo', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px hsl(160 60% 45% / 0.3);
    min-height: 54px;
    position: relative;
    overflow: hidden;
}

.btn-add-item:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px hsl(160 60% 45% / 0.5);
    background: linear-gradient(135deg, #16A34A 0%, #15803D 100%);
}

.btn-add-item:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 12px hsl(160 60% 45% / 0.4);
}

.btn-icon {
    font-size: 1.125rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.btn-text {
    font-weight: 700;
}

/* Items Management Section */
.items-management-section {
    background: var(--card-background);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-strong);
    border: 1px solid hsl(30, 15%, 92%);
}

.items-management-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid hsl(30, 15%, 92%);
}

.items-management-header h3 {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--foreground);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.items-count {
    background: var(--primary-gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 700;
}

.items-container {
    display: grid;
    gap: 1rem;
}

.management-item-card {
    background: var(--secondary-background);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    border: 2px solid hsl(30, 15%, 92%);
    transition: all 0.3s ease;
    position: relative;
    animation: slideUp 0.4s ease;
}

.management-item-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-medium);
    transform: translateY(-1px);
}

.management-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.management-item-info {
    flex: 1;
}

.management-item-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.management-item-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
}

.management-item-progress {
    background: hsl(30, 15%, 92%);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.management-item-progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.management-item-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.625rem 1rem;
    font-size: 0.9rem;
    min-width: auto;
    border-radius: var(--radius-md);
    font-weight: 600;
}

/* Enhanced Delete Button */
.btn-delete {
    background: var(--destructive-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 700;
    font-family: 'Heebo', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px hsl(0 84% 60% / 0.3);
    position: relative;
    overflow: hidden;
}

.btn-delete:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px hsl(0 84% 60% / 0.5);
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
}

.btn-delete:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 12px hsl(0 84% 60% / 0.4);
}

/* Template Selection Styles */
.template-selection-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
}

.template-selection-section h3 {
    margin: 0 0 0.5rem 0;
    color: var(--foreground);
    font-size: 1.1rem;
    font-weight: 600;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.template-card {
    padding: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--background);
    position: relative;
}

.template-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.template-card.selected {
    border-color: var(--primary);
    background: var(--primary-bg);
    box-shadow: var(--shadow-medium);
}

.template-card.selected::after {
    content: '✓';
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    width: 1.5rem;
    height: 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: bold;
}

.template-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    text-align: center;
}

.template-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--foreground);
    margin-bottom: 0.5rem;
    text-align: center;
}

.template-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    text-align: center;
    line-height: 1.4;
}

.template-items-preview {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.template-items-preview h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted-foreground);
    margin: 0 0 0.5rem 0;
    text-align: center;
}

.template-items-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: center;
}

.template-item-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--muted);
    color: var(--muted-foreground);
    border-radius: 0.375rem;
    white-space: nowrap;
}

/* Template Selection Styles */
.template-selection-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
}

.template-selection-section h3 {
    margin: 0 0 0.5rem 0;
    color: var(--foreground);
    font-size: 1.1rem;
    font-weight: 600;
}

.manual-item-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.manual-item-section h3 {
    margin: 0 0 1rem 0;
    color: var(--foreground);
    font-size: 1.1rem;
    font-weight: 600;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.template-card {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--background);
    position: relative;
    text-align: center;
}

.template-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.template-card.loading {
    cursor: default;
    opacity: 0.7;
}

.template-card.loading:hover {
    transform: none;
    border-color: var(--border-color);
}

.template-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.template-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.template-description {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    line-height: 1.3;
}

.template-items-count {
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: var(--primary);
    font-weight: 500;
}

.template-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--muted-foreground);
}

/* Template Management Styles */
.large-modal .modal-content {
    max-width: 800px;
    width: 90%;
}

.template-item-row {
    display: grid;
    grid-template-columns: 2fr 1fr 80px 2fr 40px;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--background);
}

.template-item-row input,
.template-item-row select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background: var(--card-bg);
    color: var(--foreground);
    font-size: 0.875rem;
}

.btn-remove-item {
    background: var(--destructive);
    color: white;
    border: none;
    border-radius: 0.375rem;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.btn-remove-item:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.template-card-admin {
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--card-bg);
    transition: all 0.2s ease;
}

.template-card-admin:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-medium);
}

.template-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.template-info h4 {
    margin: 0 0 0.25rem 0;
    color: var(--foreground);
    font-size: 1.1rem;
}

.template-info p {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.template-actions {
    display: flex;
    gap: 0.5rem;
}

.template-items-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.template-item-preview {
    background: var(--muted);
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    color: var(--muted-foreground);
}

.template-stats {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

@media (max-width: 768px) {
    .template-item-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    
    .template-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .template-actions {
        align-self: stretch;
    }
}

@media (max-width: 768px) {
    .template-grid {
        grid-template-columns: 1fr;
    }
    
    .template-card {
        padding: 1rem;
    }
}
.confirm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1001;
    backdrop-filter: blur(6px);
}

/* Enhanced Confirmation Modal */
.confirm-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--card-background);
    border-radius: var(--radius-xl);
    padding: 3.125rem;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-strong);
    animation: confirmSlideIn 0.4s ease;
    text-align: center;
    border: 1px solid hsl(30, 15%, 92%);
}

@keyframes confirmSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.confirm-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    color: var(--destructive-color);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.confirm-title {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--foreground);
    margin-bottom: 1rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.confirm-message {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.confirm-actions {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
}

.btn-confirm-delete {
    background: var(--destructive-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Heebo', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    position: relative;
    overflow: hidden;
}

.btn-confirm-delete:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px hsl(0 84% 60% / 0.4);
}

.btn-cancel {
    background: var(--muted-background);
    color: var(--foreground);
    border: none;
    border-radius: var(--radius-lg);
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Heebo', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    position: relative;
    overflow: hidden;
}

.btn-cancel:hover {
    background: hsl(30, 20%, 88%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px hsl(25 15% 45% / 0.3);
}

.empty-state {
    text-align: center;
    padding: 4rem 1.25rem;
    color: var(--muted-foreground);
    background: var(--secondary-background);
    border-radius: var(--radius-lg);
    border: 2px dashed hsl(30, 15%, 92%);
    position: relative;
    overflow: hidden;
}

.empty-state::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, hsl(30, 25%, 98%) 0%, transparent 70%);
    animation: float 8s ease-in-out infinite;
    opacity: 0.5;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.8;
    animation: popcornBounce 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes popcornBounce {
    0%, 100% { 
        transform: translateY(0px) scale(1); 
    }
    25% { 
        transform: translateY(-8px) scale(1.05); 
    }
    50% { 
        transform: translateY(-4px) scale(1.02); 
    }
    75% { 
        transform: translateY(-12px) scale(1.08); 
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.empty-state h4 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--foreground);
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.empty-state p {
    font-size: 1rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
    max-width: 400px;
    margin: 0 auto;
}

.empty-state-subtitle {
    font-size: 0.9rem;
    color: var(--muted-foreground);
    margin-top: 1rem;
    font-style: italic;
    position: relative;
    z-index: 1;
}
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1001;
    backdrop-filter: blur(6px);
}

/* Enhanced Confirmation Modal */
.confirm-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, white 0%, #f8f9fa 100%);
    border-radius: var(--radius-xl);
    padding: 50px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
    animation: confirmSlideIn 0.4s ease;
    text-align: center;
    border: 1px solid var(--border-color);
}

@keyframes confirmSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.confirm-icon {
    font-size: 5rem;
    margin-bottom: 24px;
    color: #f56565;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.confirm-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.confirm-message {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

.confirm-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-confirm-delete {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    position: relative;
    overflow: hidden;
}

.btn-confirm-delete::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn-confirm-delete:hover::before {
    left: 100%;
}

.btn-confirm-delete:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(245, 101, 101, 0.4);
}

.btn-cancel {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%);
    color: var(--text-primary);
    border: none;
    border-radius: var(--radius-lg);
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    position: relative;
    overflow: hidden;
}

.btn-cancel::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    transition: left 0.5s;
}

.btn-cancel:hover::before {
    left: 100%;
}

.btn-cancel:hover {
    background: linear-gradient(135deg, #cbd5e0 0%, #a0aec0 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(160, 174, 192, 0.3);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Responsive Design - Mobile First */
@media (max-width: 768px) {
    body {
        padding: 0.75rem;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    header h1 {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }
    
    .card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .link-display {
        flex-direction: column;
    }
    
    .link-display input {
        margin-bottom: 0.75rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .modal-content {
        padding: 1.5rem;
        margin: 1.25rem;
        width: calc(100% - 2.5rem);
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
        min-height: 44px;
    }
    
    /* Add Item Section Mobile */
    .add-item-section {
        padding: 1.5rem;
        margin: 1.25rem 0;
    }
    
    .add-item-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .add-item-header h2 {
        font-size: 1.5rem;
    }
    
    .form-row-modern {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-row-modern:last-child {
        grid-template-columns: 1fr;
    }
    
    .submit-group {
        justify-content: center;
    }
    
    .btn-add-item {
        width: 100%;
        justify-content: center;
    }
    
    .items-management-section {
        padding: 1.25rem;
    }
    
    .items-management-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .management-item-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .management-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .confirm-modal-content {
        padding: 2rem;
        margin: 1.25rem;
        width: calc(100% - 2.5rem);
    }
    
    .confirm-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-confirm-delete,
    .btn-cancel {
        width: 100%;
    }
}

/* Tab navigation */
.tab-navigation {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e1e5e9;
    padding-bottom: 10px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: #f8f9fa;
    color: #333;
}

.tab-btn.active {
    background: #667eea;
    color: white;
}

.tab-content {
    margin-top: 20px;
}

/* Super admin specific styles */
.super-admin-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
}

/* Organization cards */
.org-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 10px 0;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.org-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.org-card.selected {
    border-color: #28a745;
    background: #d4edda;
}

.org-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.org-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.org-type {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.org-stats {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 0.9rem;
}

.org-contact {
    margin-top: 10px;
    color: #666;
    font-size: 0.9rem;
}

/* Group and participant lists */
.entity-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 10px;
}

.entity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #e1e5e9;
    transition: background 0.3s ease;
}

.entity-item:last-child {
    border-bottom: none;
}

.entity-item:hover {
    background: #f8f9fa;
}

.entity-info {
    flex: 1;
}

.entity-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.entity-details {
    font-size: 0.9rem;
    color: #666;
}

.entity-actions {
    display: flex;
    gap: 5px;
}

.btn-small {
    padding: 4px 8px;
    font-size: 0.8rem;
    min-width: auto;
}

/* Enhanced modal styles */
.modal-content {
    max-width: 600px;
    width: 95%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 8px;
}

.status-active {
    background: #28a745;
}

.status-inactive {
    background: #dc3545;
}

.status-pending {
    background: #ffc107;
}

/* Enhanced stats cards */
.enhanced-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.enhanced-stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.enhanced-stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.enhanced-stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Breadcrumb navigation */
.breadcrumb {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Search and filter */
.search-filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    min-width: 150px;
}

/* Responsive enhancements */
@media (max-width: 768px) {
    .tab-navigation {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .tab-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .enhanced-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .search-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .org-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .org-stats {
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

/* Success messages */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid #f5c6cb;
}
/* Additional Styles */

/* Tab navigation */
.tab-navigation {
    display: flex;
    gap: 0.625rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid hsl(30, 15%, 92%);
    padding-bottom: 0.625rem;
}

.tab-btn {
    padding: 0.625rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--muted-foreground);
    font-weight: 600;
    font-family: 'Heebo', sans-serif;
    cursor: pointer;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: var(--secondary-background);
    color: var(--foreground);
}

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

.tab-content {
    margin-top: 1.25rem;
}

/* Super admin specific styles */
.super-admin-header {
    background: linear-gradient(135deg, hsl(25, 30%, 25%) 0%, hsl(25, 25%, 30%) 100%);
    color: white;
    padding: 1.25rem;
    border-radius: var(--radius-xl);
    margin-bottom: 1.875rem;
}

/* Organization cards */
.org-card {
    background: var(--secondary-background);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin: 0.625rem 0;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.org-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.org-card.selected {
    border-color: var(--accent-color);
    background: hsl(160 60% 45% / 0.1);
}

.org-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.625rem;
}

.org-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--foreground);
}

.org-type {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 600;
}

.org-stats {
    display: flex;
    gap: 1.25rem;
    color: var(--muted-foreground);
    font-size: 0.9rem;
}

.org-contact {
    margin-top: 0.625rem;
    color: var(--muted-foreground);
    font-size: 0.9rem;
}

/* Group and participant lists */
.entity-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid hsl(30, 15%, 92%);
    border-radius: var(--radius-md);
    padding: 0.625rem;
}

.entity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid hsl(30, 15%, 92%);
    transition: background 0.3s ease;
}

.entity-item:last-child {
    border-bottom: none;
}

.entity-item:hover {
    background: var(--secondary-background);
}

.entity-info {
    flex: 1;
}

.entity-name {
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.entity-details {
    font-size: 0.9rem;
    color: var(--muted-foreground);
}

.entity-actions {
    display: flex;
    gap: 0.3125rem;
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 0.5rem;
}

.status-active {
    background: var(--accent-color);
}

.status-inactive {
    background: var(--destructive-color);
}

.status-pending {
    background: var(--status-partial);
}

/* Enhanced stats cards */
.enhanced-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin: 1.875rem 0;
}

.enhanced-stat-card {
    background: var(--primary-gradient);
    color: white;
    padding: 1.5625rem;
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-strong);
}

.enhanced-stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.625rem;
}

.enhanced-stat-label {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Breadcrumb navigation */
.breadcrumb {
    background: var(--secondary-background);
    padding: 0.625rem 0.9375rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    color: var(--muted-foreground);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Search and filter */
.search-filter-bar {
    display: flex;
    gap: 0.9375rem;
    margin-bottom: 1.25rem;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 0.625rem 0.9375rem;
    border: 1px solid hsl(30, 15%, 92%);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-family: 'Heebo', sans-serif;
}

.filter-select {
    padding: 0.625rem 0.9375rem;
    border: 1px solid hsl(30, 15%, 92%);
    border-radius: var(--radius-md);
    background: var(--card-background);
    min-width: 150px;
    font-family: 'Heebo', sans-serif;
}

/* Assignment styles */
.assignment-item {
    background: var(--card-background);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid hsl(30, 15%, 92%);
    transition: all 0.3s ease;
}

.assignment-item:hover {
    box-shadow: var(--shadow-soft);
    transform: translateY(-1px);
}

.assignment-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.assignment-name {
    font-weight: 700;
    color: var(--foreground);
    font-size: 1.125rem;
}

.assignment-details {
    color: var(--muted-foreground);
    font-size: 0.9rem;
}

/* Category Icons */
.category-food::before { content: "🍖"; margin-left: 0.5rem; }
.category-drinks::before { content: "🥤"; margin-left: 0.5rem; }
.category-equipment::before { content: "🎒"; margin-left: 0.5rem; }
.category-roles::before { content: "👤"; margin-left: 0.5rem; }
.category-other::before { content: "📦"; margin-left: 0.5rem; }

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

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

/* Disabled states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled:hover {
    transform: none !important;
    box-shadow: var(--shadow-soft) !important;
}

/* Focus states for accessibility */
.btn:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .btn {
        display: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --shadow-soft: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
        --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
        --shadow-strong: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.2);
    }
    
    .card {
        border: 2px solid var(--foreground);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
/* Category-specific colors and icons */
.category-food {
    color: var(--category-food);
}

.category-drinks {
    color: var(--category-drinks);
}

.category-equipment {
    color: var(--category-equipment);
}

.category-roles {
    color: var(--category-roles);
}

.category-other {
    color: var(--category-other);
}

/* Badge styles for categories */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-food {
    background: hsl(24 85% 60% / 0.12);
    color: var(--category-food);
    border: 1px solid hsl(24 85% 60% / 0.25);
}

.badge-drinks {
    background: hsl(199 89% 48% / 0.15);
    color: var(--category-drinks);
    border: 1px solid hsl(199 89% 48% / 0.3);
}

.badge-equipment {
    background: hsl(271 81% 56% / 0.15);
    color: var(--category-equipment);
    border: 1px solid hsl(271 81% 56% / 0.3);
}

.badge-roles {
    background: hsl(160 60% 45% / 0.15);
    color: var(--category-roles);
    border: 1px solid hsl(160 60% 45% / 0.3);
}

.badge-other {
    background: hsl(25 15% 45% / 0.15);
    color: var(--category-other);
    border: 1px solid hsl(25 15% 45% / 0.3);
}

/* Gradient backgrounds for hero sections */
.hero-gradient {
    background: 
        radial-gradient(circle at 20% 20%, hsl(24 95% 53% / 0.05) 288px, transparent 288px),
        radial-gradient(circle at 80% 80%, hsl(160 60% 45% / 0.05) 384px, transparent 384px),
        var(--background);
}

/* Enhanced focus states */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection colors */
::selection {
    background: hsl(24 95% 53% / 0.2);
    color: var(--foreground);
}

::-moz-selection {
    background: hsl(24 95% 53% / 0.2);
    color: var(--foreground);
}

/* Scrollbar styling for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--muted-background);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
    background: var(--muted-foreground);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Dark mode support (if needed in the future) */
@media (prefers-color-scheme: dark) {
    /* This can be expanded later if dark mode is needed */
}

/* Animation delays for staggered effects */
.card:nth-child(1) { animation-delay: 0ms; }
.card:nth-child(2) { animation-delay: 100ms; }
.card:nth-child(3) { animation-delay: 200ms; }
.card:nth-child(4) { animation-delay: 300ms; }

.item-card:nth-child(1) { animation-delay: 0ms; }
.item-card:nth-child(2) { animation-delay: 50ms; }
.item-card:nth-child(3) { animation-delay: 100ms; }
.item-card:nth-child(4) { animation-delay: 150ms; }
.item-card:nth-child(5) { animation-delay: 200ms; }
.item-card:nth-child(6) { animation-delay: 250ms; }

/* Improved touch targets for mobile */
@media (max-width: 768px) {
    .btn,
    input,
    textarea,
    select,
    .dropdown-selected {
        min-height: 44px;
        touch-action: manipulation;
    }
    
    .quantity-btn {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Loading states */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    color: white;
}

/* Error states */
.form-group.error input,
.form-group.error textarea,
.form-group.error select {
    border-color: var(--destructive-color);
    box-shadow: 0 0 0 3px hsl(0 84% 60% / 0.1);
}

.form-group.error label {
    color: var(--destructive-color);
}

.error-text {
    color: var(--destructive-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Success states */
.form-group.success input,
.form-group.success textarea,
.form-group.success select {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px hsl(160 60% 45% / 0.1);
}

.form-group.success label {
    color: var(--accent-color);
}

.success-text {
    color: var(--accent-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
}
/* Item category display with icons */
.item-category-display {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    font-weight: 500;
}

.item-category-display .category-icon {
    font-size: 1rem;
}

/* Management item category display */
.management-item-category {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    font-weight: 500;
}

.management-item-category .category-icon {
    font-size: 1rem;
}

/* Category title with icons */
.category-title-with-icon {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary-color);
    position: relative;
}

.category-title-with-icon .category-icon {
    font-size: 1.5rem;
}

.category-title-with-icon::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 2px;
}
/* Special styling for days until event card */
.stat-card.urgent {
    background: linear-gradient(135deg, hsl(45, 100%, 96%) 0%, hsl(45, 100%, 92%) 100%);
    border-color: var(--status-partial);
}

.stat-card.urgent .stat-number {
    color: var(--status-partial);
    animation: pulse 2s infinite;
}

.stat-card.today {
    background: linear-gradient(135deg, hsl(24, 100%, 96%) 0%, hsl(24, 100%, 92%) 100%);
    border-color: var(--primary-color);
}

.stat-card.today .stat-number {
    color: var(--primary-color);
    animation: pulse 1.5s infinite;
}

.stat-card.past {
    background: var(--muted-background);
    opacity: 0.7;
}

.stat-card.past .stat-number {
    color: var(--muted-foreground);
}

/* Responsive grid for 4 items */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
/* Item quantity display */
.item-quantity {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    font-weight: 500;
    margin-top: 0.25rem;
}

/* Enhanced full item styling */
.item-card.full {
    background: var(--muted-background);
    border-color: var(--muted-foreground);
    cursor: not-allowed !important;
    opacity: 0.6;
}

.item-card.full .item-title {
    color: var(--muted-foreground);
    text-decoration: line-through;
}

.item-card.full:hover {
    transform: none !important;
    box-shadow: var(--shadow-soft) !important;
}
/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    background: var(--card-background);
    border: 2px solid var(--muted-background);
    border-radius: var(--radius-pill);
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-strong);
    border-color: var(--primary-color);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* Theme toggle icons */
.theme-toggle .light-icon {
    display: none;
}

.theme-toggle .dark-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .light-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .dark-icon {
    display: none;
}

/* Auto dark mode icons */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .light-icon {
        display: block;
    }
    
    :root:not([data-theme="light"]) .theme-toggle .dark-icon {
        display: none;
    }
}

/* Dark mode specific adjustments */
[data-theme="dark"] body {
    background-image: 
        radial-gradient(circle at 20% 20%, hsl(24 85% 60% / 0.02) 288px, transparent 288px),
        radial-gradient(circle at 80% 80%, hsl(160 60% 45% / 0.02) 384px, transparent 384px);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) body {
        background-image: 
            radial-gradient(circle at 20% 20%, hsl(24 85% 60% / 0.02) 288px, transparent 288px),
            radial-gradient(circle at 80% 80%, hsl(160 60% 45% / 0.02) 384px, transparent 384px);
    }
}

/* Dark mode form adjustments */
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .form-group select {
    border-color: var(--muted-background);
    background: var(--secondary-background);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus,
[data-theme="dark"] .form-group select:focus {
    border-color: var(--primary-color);
    background: var(--card-background);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .form-group input,
    :root:not([data-theme="light"]) .form-group textarea,
    :root:not([data-theme="light"]) .form-group select {
        border-color: var(--muted-background);
        background: var(--secondary-background);
    }

    :root:not([data-theme="light"]) .form-group input:focus,
    :root:not([data-theme="light"]) .form-group textarea:focus,
    :root:not([data-theme="light"]) .form-group select:focus {
        border-color: var(--primary-color);
        background: var(--card-background);
    }
}

/* Dark mode dropdown adjustments */
[data-theme="dark"] .dropdown-options {
    background: var(--card-background);
    border-color: var(--muted-background);
}

[data-theme="dark"] .dropdown-option:hover {
    background: var(--secondary-background);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .dropdown-options {
        background: var(--card-background);
        border-color: var(--muted-background);
    }

    :root:not([data-theme="light"]) .dropdown-option:hover {
        background: var(--secondary-background);
    }
}

/* Dark mode modal adjustments */
[data-theme="dark"] .modal {
    background: rgba(0,0,0,0.8);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .modal {
        background: rgba(0,0,0,0.8);
    }
}

/* Dark mode scrollbar */
[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--secondary-background);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--muted-foreground);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) ::-webkit-scrollbar-track {
        background: var(--secondary-background);
    }

    :root:not([data-theme="light"]) ::-webkit-scrollbar-thumb {
        background: var(--muted-foreground);
    }
}

/* Smooth theme transition */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Preserve animations and transforms */
.btn, .card, .item-card, .stat-card {
    transition: all 0.3s ease;
}
/* Dark mode specific component adjustments */

/* Enhanced full item styling for dark mode */
[data-theme="dark"] .item-card.full {
    background: var(--muted-background);
    border-color: var(--muted-foreground);
    opacity: 0.7;
}

[data-theme="dark"] .item-card.full .item-title {
    color: var(--muted-foreground);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .item-card.full {
        background: var(--muted-background);
        border-color: var(--muted-foreground);
        opacity: 0.7;
    }

    :root:not([data-theme="light"]) .item-card.full .item-title {
        color: var(--muted-foreground);
    }
}

/* Dark mode badge adjustments */
[data-theme="dark"] .badge-food {
    background: hsl(24 95% 53% / 0.2);
    border-color: hsl(24 95% 53% / 0.4);
}

[data-theme="dark"] .badge-drinks {
    background: hsl(199 89% 48% / 0.2);
    border-color: hsl(199 89% 48% / 0.4);
}

[data-theme="dark"] .badge-equipment {
    background: hsl(271 81% 56% / 0.2);
    border-color: hsl(271 81% 56% / 0.4);
}

[data-theme="dark"] .badge-roles {
    background: hsl(160 60% 45% / 0.2);
    border-color: hsl(160 60% 45% / 0.4);
}

[data-theme="dark"] .badge-other {
    background: hsl(25 15% 45% / 0.2);
    border-color: hsl(25 15% 45% / 0.4);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .badge-food {
        background: hsl(24 95% 53% / 0.2);
        border-color: hsl(24 95% 53% / 0.4);
    }

    :root:not([data-theme="light"]) .badge-drinks {
        background: hsl(199 89% 48% / 0.2);
        border-color: hsl(199 89% 48% / 0.4);
    }

    :root:not([data-theme="light"]) .badge-equipment {
        background: hsl(271 81% 56% / 0.2);
        border-color: hsl(271 81% 56% / 0.4);
    }

    :root:not([data-theme="light"]) .badge-roles {
        background: hsl(160 60% 45% / 0.2);
        border-color: hsl(160 60% 45% / 0.4);
    }

    :root:not([data-theme="light"]) .badge-other {
        background: hsl(25 15% 45% / 0.2);
        border-color: hsl(25 15% 45% / 0.4);
    }
}

/* Dark mode status adjustments */
[data-theme="dark"] .status-available {
    background: hsl(160 60% 45% / 0.2);
    border-color: hsl(160 60% 45% / 0.4);
}

[data-theme="dark"] .status-partial {
    background: hsl(45 93% 47% / 0.2);
    border-color: hsl(45 93% 47% / 0.4);
}

[data-theme="dark"] .status-full {
    background: hsl(25 15% 45% / 0.2);
    border-color: hsl(25 15% 45% / 0.4);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .status-available {
        background: hsl(160 60% 45% / 0.2);
        border-color: hsl(160 60% 45% / 0.4);
    }

    :root:not([data-theme="light"]) .status-partial {
        background: hsl(45 93% 47% / 0.2);
        border-color: hsl(45 93% 47% / 0.4);
    }

    :root:not([data-theme="light"]) .status-full {
        background: hsl(25 15% 45% / 0.2);
        border-color: hsl(25 15% 45% / 0.4);
    }
}

/* Dark mode link box adjustments */
[data-theme="dark"] .admin-box {
    background: hsl(45, 50%, 12%);
    border-color: hsl(45, 60%, 25%);
}

[data-theme="dark"] .help-text.warning {
    color: hsl(45, 80%, 70%);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .admin-box {
        background: hsl(45, 50%, 12%);
        border-color: hsl(45, 60%, 25%);
    }

    :root:not([data-theme="light"]) .help-text.warning {
        color: hsl(45, 80%, 70%);
    }
}

/* Dark mode message adjustments */
[data-theme="dark"] .success-message {
    background: hsl(160 60% 45% / 0.2);
    color: hsl(160, 80%, 80%);
    border-color: hsl(160 60% 45% / 0.4);
}

[data-theme="dark"] .error-message {
    background: hsl(0 84% 60% / 0.2);
    color: hsl(0, 80%, 80%);
    border-color: hsl(0 84% 60% / 0.4);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .success-message {
        background: hsl(160 60% 45% / 0.2);
        color: hsl(160, 80%, 80%);
        border-color: hsl(160 60% 45% / 0.4);
    }

    :root:not([data-theme="light"]) .error-message {
        background: hsl(0 84% 60% / 0.2);
        color: hsl(0, 80%, 80%);
        border-color: hsl(0 84% 60% / 0.4);
    }
}

/* Theme toggle accessibility */
.theme-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Ensure proper contrast in dark mode */
[data-theme="dark"] .category-title::after {
    background: var(--primary-gradient);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .category-title::after {
        background: var(--primary-gradient);
    }
}