@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700;800;900&family=Montserrat:wght@700;800;900&display=swap');

:root {
    --color-primary: #e30613; /* Seigneurie Mia Brand Red */
    --color-primary-hover: #c40510;
    --color-secondary: #00a2e2; /* Seigneurie Mia Brand Blue/Cyan */
    --color-secondary-hover: #0087bd;
    --color-tertiary: #1f2427; /* Dark Charcoal Slate */
    --color-background: #f7f9fb; /* Cool Slate Light background */
    --color-surface: #ffffff;
    --color-border: #e2e8f0;
    --color-text-primary: #1f2427;
    --color-text-secondary: #5e6d7a;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-ambient: 0 12px 30px rgba(0, 43, 92, 0.04);
    --shadow-elevated: 0 24px 48px rgba(0, 43, 92, 0.08);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--color-secondary) transparent;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background-color: rgba(0, 102, 135, 0.2);
    border-radius: 20px;
}
::-webkit-scrollbar-thumb:hover {
    background-color: var(--color-secondary);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-background);
    color: var(--color-text-primary);
    font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    animation: fadeInBody 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInBody {
    from { opacity: 0; }
    to { opacity: 1; }
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: var(--color-tertiary);
    margin-top: 0;
    letter-spacing: -0.02em;
}

/* Sticky Premium Glassmorphic Headers */
.app-header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    transition: var(--transition-normal);
}

.admin-navbar {
    background-color: rgba(25, 28, 30, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: var(--transition-normal);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
}

/* Perfect Button Symmetry */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0 28px;
    font-family: 'Hanken Grotesk', sans-serif;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-normal);
    box-sizing: border-box;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    border: 2px solid var(--color-primary);
    box-shadow: 0 4px 14px rgba(186, 0, 19, 0.2);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(186, 0, 19, 0.35);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

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

.btn-secondary:hover {
    background-color: var(--color-secondary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 135, 0.15);
}

.btn-secondary:active {
    transform: translateY(0) scale(0.98);
}

/* Form Controls with Smooth Transitions */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 8px;
    color: var(--color-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.form-control {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    background-color: var(--color-surface);
    color: var(--color-text-primary);
    font-family: inherit;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal), background-color var(--transition-normal);
}

textarea.form-control {
    height: auto;
    padding: 14px 16px;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 4px rgba(0, 102, 135, 0.12);
}

/* Premium smooth cards */
.card {
    background: var(--color-surface);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-ambient);
    padding: 40px;
    position: relative;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-elevated);
    border-color: rgba(0, 102, 135, 0.25);
}

/* Stepper Wizard */
.stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    padding: 0 20px;
}

.stepper::before {
    content: '';
    position: absolute;
    top: 22px;
    left: 40px;
    right: 40px;
    height: 4px;
    background-color: var(--color-border);
    z-index: 1;
    border-radius: 2px;
}

.step-item {
    position: relative;
    z-index: 2;
    background-color: var(--color-background);
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--color-surface);
    border: 3px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    color: var(--color-text-secondary);
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.step-item.active .step-circle {
    border-color: var(--color-secondary);
    background-color: var(--color-secondary);
    color: white;
    box-shadow: 0 0 0 6px rgba(0, 102, 135, 0.15);
}

.step-title {
    margin-top: 12px;
    font-size: 12px;
    font-weight: 800;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: color var(--transition-normal);
}

.step-item.active .step-title {
    color: var(--color-secondary);
}

/* Elegant Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    background-color: #f8fafc;
    padding: 16px 20px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #475569;
    border-bottom: 2px solid var(--color-border);
}

td {
    padding: 16px 20px;
    font-size: 14px;
    color: var(--color-text-primary);
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
    transition: background-color var(--transition-fast);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #f8fafc;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1;
}

.badge-success {
    background-color: #dcfce7;
    color: #15803d;
}

.badge-danger {
    background-color: #fee2e2;
    color: #b91c1c;
}

.badge-info {
    background-color: #e0f2fe;
    color: #0369a1;
}

.badge-secondary {
    background-color: #f1f5f9;
    color: #475569;
}

/* Smooth Fade in Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Grids */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

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

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 50px;
}

@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Admin Navbar links styling */
.admin-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.admin-nav-links {
    display: flex;
    gap: 5px;
    height: 100%;
}

.admin-nav-link {
    color: #d9dadc;
    text-decoration: none;
    padding: 0 20px;
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    height: 100%;
    position: relative;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.05);
}

.admin-nav-link.active {
    color: white;
}

.admin-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background-color: var(--color-secondary);
}

@media (max-width: 768px) {
    .admin-nav-container {
        flex-direction: column;
        height: auto;
        padding: 16px;
        gap: 16px;
    }
    
    .admin-nav-links {
        width: 100%;
        justify-content: center;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding-top: 12px;
    }
    
    .admin-nav-link {
        padding: 10px 14px;
        font-size: 13px;
    }
}

.main-admin-content {
    padding: 40px 0;
}

/* Tabs Styling */
.tabs-nav {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 30px;
    padding-bottom: 2px;
    overflow-x: auto;
}
.tab-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-secondary);
    cursor: pointer;
    border-radius: 6px;
    transition: all var(--transition-smooth);
    position: relative;
    white-space: nowrap;
}
.tab-btn:hover {
    color: var(--color-secondary);
    background-color: var(--color-background);
}
.tab-btn.active {
    color: var(--color-secondary);
    background-color: rgba(0, 102, 135, 0.05);
}
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--color-secondary);
    border-radius: 3px 3px 0 0;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
    animation: fadeIn var(--transition-smooth) forwards;
}

/* Prizes and Grid Styling */
.prizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}
.prize-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}
.prize-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-ambient);
}
.prize-image-container {
    height: 180px;
    background-color: #f3f4f6;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
}
.prize-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.prize-placeholder-image {
    color: var(--color-text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.prize-details {
    padding: 20px;
}
.prize-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: var(--color-tertiary);
}
.prize-desc {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin: 0 0 20px 0;
    line-height: 1.6;
    height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
.prize-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid var(--color-border);
    padding-top: 15px;
}
