/* ===== RESPONSIVE DESIGN CON BOOTSTRAP 5 ===== */

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #ff6b35;
    --text-light: #f5f5f5;
    --text-dark: #333;
    --border-color: #ddd;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

html, body {
    height: 100%;
    width: 100%;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--primary-color);
    color: var(--text-dark);
    line-height: 1.6;
}

/* ===== NAVBAR ===== */
.navbar {
    background-color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    box-shadow: var(--shadow);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--secondary-color) !important;
    font-family: 'Anton', sans-serif;
}

/* ===== CARDS ===== */
.card {
    border-radius: 10px;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.card-custom {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2a2a2a 100%);
    color: var(--text-light);
    border: 2px solid var(--secondary-color);
    min-height: 160px;
}

.card-custom:hover {
    border-color: #ff8c5a;
}

/* ===== BUTTONS ===== */
.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    font-weight: 600;
    border-radius: 8px;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #ff8c5a;
    border-color: #ff8c5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 1.1rem;
}

/* ===== FORM ===== */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
}

.form-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

/* ===== LOGIN PAGE ===== */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2a2a2a 100%);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    padding: 40px;
    max-width: 450px;
    width: 100%;
}

.login-card h1 {
    font-family: 'Anton', sans-serif;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 10px;
    font-size: 2rem;
}

.login-card .subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

/* ===== DISPLAY PAGE ===== */
.display-container {
    background: var(--primary-color);
    color: var(--text-light);
    min-height: 100vh;
    padding: 20px;
}

.display-header {
    text-align: center;
    margin-bottom: 40px;
}

.display-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 20px;
}

.display-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-family: 'Anton', sans-serif;
    margin-bottom: 10px;
}

.display-number {
    font-size: clamp(4rem, 10vw, 8rem);
    font-family: 'Anton', sans-serif;
    color: var(--secondary-color);
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.gallery-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.gallery-item img, .gallery-item video {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== ADMIN PANEL ===== */
.admin-container {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 20px;
}

.admin-header {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.admin-header h1 {
    font-family: 'Anton', sans-serif;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.admin-sidebar {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.admin-sidebar ul {
    list-style: none;
    padding: 0;
}

.admin-sidebar li {
    margin-bottom: 10px;
}

.admin-sidebar a {
    display: block;
    padding: 12px 15px;
    border-radius: 8px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.admin-sidebar a:hover {
    background-color: #f0f0f0;
    border-left-color: var(--secondary-color);
    color: var(--secondary-color);
}

.admin-sidebar a.active {
    background-color: var(--secondary-color);
    color: white;
    border-left-color: var(--secondary-color);
}

/* ===== TABLE ===== */
.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table thead {
    background-color: var(--primary-color);
    color: white;
}

.table tbody tr {
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background-color: #f9f9f9;
}

/* ===== BANCONE (COUNTER) PAGE ===== */
.bancone-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2a2a2a 100%);
    color: white;
    padding: 20px;
}

.bancone-reparto {
    text-align: center;
    margin-bottom: 40px;
}

.bancone-reparto h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 10px;
    font-family: 'Anton', sans-serif;
}

.bancone-reparto h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    opacity: 0.9;
}

.bancone-numero {
    font-size: clamp(5rem, 15vw, 10rem);
    font-family: 'Anton', sans-serif;
    color: var(--secondary-color);
    text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
    line-height: 1;
    margin: 40px 0;
}

.bancone-controls {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.bancone-btn {
    width: 120px;
    height: 120px;
    border-radius: 15px;
    border: 3px solid var(--secondary-color);
    background-color: var(--secondary-color);
    color: white;
    font-size: clamp(2rem, 5vw, 3rem);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.bancone-btn:hover {
    background-color: #ff8c5a;
    border-color: #ff8c5a;
    transform: scale(1.1);
}

.bancone-btn:active {
    transform: scale(0.95);
}

.bancone-info {
    text-align: center;
    margin-top: 40px;
    opacity: 0.8;
    font-size: 1.1rem;
}

/* ===== ALERT ===== */
.alert {
    border-radius: 10px;
    border: none;
    padding: 15px 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */
@media (max-width: 768px) {
    .display-number {
        font-size: clamp(2rem, 8vw, 5rem);
    }

    .login-card {
        padding: 30px 20px;
    }

    .bancone-btn {
        width: 100px;
        height: 100px;
        font-size: clamp(1.5rem, 4vw, 2rem);
    }

    .gallery-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .display-title {
        font-size: clamp(1.5rem, 3vw, 2.5rem);
    }

    .login-card {
        padding: 25px 15px;
    }

    .login-card h1 {
        font-size: 1.5rem;
    }

    .bancone-numero {
        font-size: clamp(3rem, 10vw, 6rem);
    }

    .bancone-btn {
        width: 80px;
        height: 80px;
        font-size: clamp(1rem, 3vw, 1.5rem);
    }
}

/* ===== UTILITIES ===== */
.text-center {
    text-align: center;
}

.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-5 { margin-top: 3rem; }
.mb-5 { margin-bottom: 3rem; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.shadow { box-shadow: var(--shadow); }

.text-muted {
    color: #6c757d;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: var(--secondary-color);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
