:root {
    --primary: #6C5CE7;
    --primary-dark: #5649c0;
    --secondary: #a29bfe;
    --accent: #00b894;
    --danger: #ff7675;
    --warning: #fdcb6e;
    --success: #55efc4;
    --dark: #2d3436;
    --light: #dfe6e9;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --bg-gradient: linear-gradient(135deg, #6C5CE7 0%, #a29bfe 100%);
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    --radius: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background: #f5f6fa;
    color: var(--text-dark);
    min-height: 100vh;
    line-height: 1.6;
}

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header & Nav */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-header h1 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--dark);
}

.main-nav {
    display: flex;
    gap: 10px;
    background: var(--light);
    padding: 5px;
    border-radius: 12px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.main-nav a:hover {
    color: var(--dark);
    background: rgba(0, 0, 0, 0.05);
}

.main-nav a.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Buttons */
button,
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

button:hover,
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
}

button.secondary,
.secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid #eee;
    padding: 8px 15px;
    /* Smaller padding for secondary */
}

button.secondary:hover,
.secondary:hover {
    border-color: var(--text-light);
    background: transparent;
    color: var(--text-dark);
    box-shadow: none;
    transform: none;
}

button.danger,
.danger {
    background: var(--danger);
    color: white;
}

button.danger:hover,
.danger:hover {
    box-shadow: 0 5px 15px rgba(255, 118, 117, 0.3);
}

button.small,
.small {
    padding: 5px 12px;
    font-size: 0.85rem;
    width: auto;
}

.btn-viewer {
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    padding: 8px 15px;
    border: 2px solid var(--primary);
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.9rem;
    display: inline-block;
}

.btn-viewer:hover {
    background: var(--primary);
    color: white;
}

.full-width {
    width: 100%;
    display: block;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-light);
}

input,
select {
    width: 100%;
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: inherit;
    background: white;
}

input:focus,
select:focus {
    border-color: var(--primary);
    outline: none;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    align-items: start;
}

.sidebar {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 20px;
}

.sidebar h3 {
    margin-bottom: 20px;
    color: var(--primary);
}

.main-content {
    /* No specific styles needed, just a container */
}

.main-content h2 {
    margin-bottom: 20px;
    color: var(--dark);
}

/* Stats */
.stat-card {
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-card.compact {
    padding: 15px;
    background: var(--light);
    border: none;
    box-shadow: none;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 700;
}

/* Turns List */
.turns-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.turn-card {
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 6px solid var(--success);
    position: relative;
    transition: transform 0.2s;
}

.turn-card:hover {
    transform: translateY(-5px);
}

.turn-card.warning {
    border-left-color: var(--warning);
}

.turn-card.danger {
    border-left-color: var(--danger);
}

.turn-card.finished {
    opacity: 0.7;
    border-left-color: #95A5A6;
    background: #f8f9fa;
}

.turn-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.turn-names {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.turn-time {
    font-size: 2rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--primary);
    margin: 10px 0;
}

.turn-meta {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Full Width Views */
.full-width-view {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.table-container {
    margin-top: 20px;
    overflow-x: auto;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: var(--light);
    font-weight: 700;
    color: var(--dark);
    text-transform: uppercase;
    font-size: 0.85rem;
}

/* Pricing Grid */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.pricing-column {
    background: #f8f9fa;
    padding: 20px;
    border-radius: var(--radius);
}

.pricing-column h3 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary);
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.pricing-card {
    background: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.pricing-card label {
    font-weight: 600;
}

.price-input-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pricing-card input {
    width: 80px;
    padding: 8px;
    text-align: right;
    font-weight: 700;
}

/* Reports */
.reports-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    background: var(--light);
    padding: 20px;
    border-radius: var(--radius);
    align-items: flex-end;
    flex-wrap: wrap;
}

.reports-controls .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 200px;
}

/* Login Page */
.login-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-gradient);
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

/* Utilities */
.divider {
    border: 0;
    border-top: 1px solid #eee;
    margin: 25px 0;
}

.price-display {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-top: 5px;
}

/* Viewer Page */
.viewer-body {
    background: var(--dark);
    color: white;
}

.viewer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 30px;
}

.viewer-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.viewer-name {
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.viewer-timer {
    font-size: 4rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* Print */
@media print {

    .sidebar,
    .main-header,
    .reports-controls button,
    .btn-viewer {
        display: none !important;
    }

    .container {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    .full-width-view {
        box-shadow: none;
        padding: 0;
    }

    .data-table th {
        background: #eee !important;
        color: black !important;
    }

    body {
        background: white;
    }
}