/* Le4e20 Logo-Inspired Dark Theme */
:root {
    /* Palette basata sui colori del logo Le4e20 */
    --logo-blue: #1E90FF;           /* Blu elettrico principale del logo */
    --logo-dark-blue: #0066CC;      /* Versione più scura del blu */
    --logo-gray: #2F3349;           /* Grigio scuro urbano */
    --logo-charcoal: #1A1D29;       /* Antracite profondo */
    --logo-black: #0D0F14;          /* Nero del logo */
    --logo-silver: #C4C7D0;         /* Argento per accenti */
    
    /* Colori principali sistema */
    --primary-color: var(--logo-blue);
    --secondary-color: var(--logo-dark-blue);
    --success-color: #00CC66;
    --danger-color: #FF4444;
    --warning-color: #FF8800;
    --light-color: var(--logo-silver);
    --dark-color: var(--logo-black);
    
    /* Layout e design */
    --border-radius: 16px;
    --box-shadow: 0 10px 30px rgba(13, 15, 20, 0.6);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Gradienti ispirati al logo */
    --gradient-primary: linear-gradient(135deg, var(--logo-black) 0%, var(--logo-charcoal) 50%, var(--logo-gray) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--logo-dark-blue) 0%, var(--logo-blue) 50%, #4DA6FF 100%);
    --gradient-card: rgba(47, 51, 73, 0.9);
    --gradient-card-hover: rgba(30, 144, 255, 0.1);
    
    /* Testi con buon contrasto */
    --text-primary: #FFFFFF;
    --text-secondary: var(--logo-silver);
    --text-muted: #8B92A9;
}

/* Tema scuro coerente con logo Le4e20 */
body, .container, .webapp-body {
    background: var(--gradient-primary) !important;
    color: var(--text-primary) !important;
}

/* Testi con palette Le4e20 - buon contrasto su sfondo scuro */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
    text-shadow: 0 2px 4px rgba(13, 15, 20, 0.3);
}

p, span, div, label {
    color: var(--text-secondary) !important;
    font-weight: 400 !important;
}

/* Links con colore logo */
a {
    color: var(--logo-blue) !important;
    transition: var(--transition);
}

a:hover {
    color: #4DA6FF !important;
}

/* Pulsanti con stile logo */
.btn {
    background: var(--gradient-secondary) !important;
    color: white !important;
    border: 1px solid var(--logo-blue) !important;
    font-weight: 500 !important;
}

.btn:hover {
    background: var(--logo-blue) !important;
    box-shadow: 0 5px 15px rgba(30, 144, 255, 0.3) !important;
}

.btn-outline {
    background: transparent !important;
    color: var(--logo-blue) !important;
    border: 2px solid var(--logo-blue) !important;
}

.btn-outline:hover {
    background: var(--logo-blue) !important;
    color: white !important;
}

/* Card con stile urbano del logo */
.card, .client-card, .search-section .card {
    background: var(--gradient-card) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(30, 144, 255, 0.2) !important;
    color: var(--text-primary) !important;
}

.card:hover, .client-card:hover {
    background: var(--gradient-card-hover) !important;
    border-color: var(--logo-blue) !important;
}

/* Form con stile Le4e20 */
.form-control, input, select, textarea {
    background: var(--logo-charcoal) !important;
    color: var(--text-primary) !important;
    border: 2px solid var(--logo-gray) !important;
    transition: var(--transition) !important;
}

.form-control:focus, input:focus, select:focus, textarea:focus {
    border-color: var(--logo-blue) !important;
    box-shadow: 0 0 10px rgba(30, 144, 255, 0.3) !important;
    outline: none !important;
}

.form-control::placeholder {
    color: var(--text-muted) !important;
}

/* Badge e alert con colori logo */
.badge {
    background: var(--gradient-secondary) !important;
    color: white !important;
    border: 1px solid var(--logo-blue) !important;
}

.alert {
    background: var(--gradient-card) !important;
    border: 1px solid var(--logo-blue) !important;
    color: var(--text-primary) !important;
}

.alert-danger {
    background: rgba(255, 68, 68, 0.1) !important;
    border-color: var(--danger-color) !important;
    color: #FFB3B3 !important;
}

.alert-success {
    background: rgba(0, 204, 102, 0.1) !important;
    border-color: var(--success-color) !important;
    color: #B3FFD9 !important;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
    background: var(--gradient-primary);
    min-height: 100vh;
    line-height: 1.6;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Miglioramenti specifici per Telegram WebApp Mobile */
body.webapp-body {
    padding: 0;
    margin: 0;
    overscroll-behavior: none;
    touch-action: manipulation;
}

.webapp-body .container {
    padding: 8px;
    max-width: 100vw;
    overflow-x: hidden;
    display: block; /* Cambiato da flex per permettere scroll */
    width: 100%;
    min-height: auto; /* Cambiato per permettere contenuto più lungo */
}

/* Login Page Mobile Centering */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.login-card {
    width: 100%;
    max-width: 350px;
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile Scrollable Content */
.scrollable-content {
    min-height: 100vh;
    max-height: none;
    overflow-y: scroll;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    position: relative;
    padding-bottom: 50px; /* Spazio per scroll finale */
}

/* Client Grid Mobile Layout */
.client-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 0;
    width: 100%;
    max-width: 100%;
}

.client-card {
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    width: 100%;
    box-sizing: border-box;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
    padding: 20px 0;
}

/* Header pubblico con stile Le4e20 */
.public-header, .webapp-header {
    background: var(--gradient-card) !important;
    border: 2px solid var(--logo-blue) !important;
    border-radius: var(--border-radius) !important;
    padding: 20px !important;
    margin: 10px 10px 30px 10px !important;
    text-align: center !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 8px 32px rgba(30, 144, 255, 0.3) !important;
}

.public-header h1, .webapp-header h1 {
    color: var(--logo-blue) !important;
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    margin: 15px 0 5px 0 !important;
    text-shadow: 0 2px 8px rgba(30, 144, 255, 0.5) !important;
    letter-spacing: 0.5px !important;
}

.public-header .logo-container, .webapp-header .logo-container {
    margin-bottom: 15px !important;
}

.public-header .logo-img, .webapp-header .logo-img {
    width: 70px !important;
    height: 70px !important;
    border-radius: 50% !important;
    border: 3px solid var(--logo-blue) !important;
    box-shadow: 0 5px 20px rgba(30, 144, 255, 0.4) !important;
}

.logo-container {
    margin-bottom: 20px;
}

.logo-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    border: 4px solid rgba(255,255,255,0.2);
    transition: var(--transition);
}

.logo-img:hover {
    transform: scale(1.05);
}

.logo-fallback {
    font-size: 4rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
}

.header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: -0.5px;
}

.header p {
    opacity: 0.9;
    font-size: 1.1rem;
    font-weight: 400;
}

/* Cards */
.card {
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 24px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(71, 85, 105, 0.3);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    background: var(--gradient-card-hover);
}

.welcome-card {
    background: var(--gradient-success);
    color: var(--text-primary);
    border: 1px solid rgba(5, 150, 105, 0.3);
}

.welcome-card .card-title,
.welcome-card .card-text {
    color: var(--text-primary);
}

.action-card {
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.stats-card {
    background: var(--gradient-secondary);
    color: var(--text-primary);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.stats-card .card-title {
    color: var(--text-primary);
}

.logout-card {
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.card-body {
    padding: 32px 24px;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.card-text {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 1rem;
    line-height: 1.6;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    margin-bottom: 12px;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline:hover {
    background: white;
    color: var(--primary-color);
}

/* Login Page Specific Styles */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo-container {
    margin-bottom: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-logo-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    display: block;
    margin: 0 auto;
}

.login-logo-fallback {
    font-size: 3rem;
    color: white;
    text-align: center;
}

/* Logo Section Centering */
.logo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    max-width: 120px;
    height: auto;
    margin: 0 auto 1rem auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Header and Logo Centering */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid rgba(71, 85, 105, 0.3);
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.logo img, .logo-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: block;
    margin: 0 auto;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 10px;
}

.logo-fallback {
    font-size: 2rem;
    color: var(--primary-color);
    text-align: center;
}

.login-form {
    margin: 20px 0;
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.info-card {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
}

.info-list li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    line-height: 1.4;
}

.info-icon {
    margin-right: 10px;
    font-size: 1.1rem;
}

/* Mobile Responsive Improvements */
@media (max-width: 768px) {
    .container {
        padding: 5px;
    }
    
    .login-container {
        padding: 10px;
        justify-content: flex-start;
        padding-top: 20px;
    }
    
    .login-card {
        max-width: 100%;
        padding: 20px;
        margin: 0;
    }
    
    .header {
        margin-bottom: 20px;
        padding: 10px 0;
    }
    
    .logo-img, .login-logo-img, .logo img {
        width: 60px;
        height: 60px;
        margin: 0 auto;
        display: block;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .logo, .logo-container {
        margin-bottom: 10px;
        width: 100%;
        text-align: center;
    }
    
    .card {
        margin-bottom: 15px;
    }
    
    .card-body {
        padding: 16px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .client-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .client-card {
        padding: 16px;
    }
    
    .search-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .header-actions {
        margin-top: 15px;
    }
    
    .header-actions .btn {
        margin: 5px;
        min-width: 120px;
    }
    
    .form-control {
        font-size: 16px; /* Previene zoom su iOS */
    }
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.1);
}

/* Login specific styles */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(71, 85, 105, 0.3);
    color: var(--text-primary);
}

.feature-explanation {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin: 16px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: left;
}

.feature-explanation strong {
    color: var(--primary-color);
}

/* Admin Dashboard Styles */
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-bottom: 2px solid rgba(71, 85, 105, 0.3);
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-header h1 {
    margin: 0;
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.stats-grid, .clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.client-card {
    position: relative;
}

.pinned-client {
    border: 2px solid var(--warning-color);
    box-shadow: 0 0 20px rgba(217, 119, 6, 0.3);
}

.pinned-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--warning-color);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.client-name {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.client-location {
    color: var(--text-secondary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.client-description {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-style: italic;
}

.client-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.telegram-btn {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.website-btn {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.phone-btn {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.email-btn {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.additional-info {
    background: rgba(71, 85, 105, 0.3);
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
}

.additional-info strong {
    color: var(--text-primary);
}

.additional-info p {
    margin: 5px 0 0;
    color: var(--text-secondary);
}

/* Search Section */
.search-section {
    margin-bottom: 30px;
}

.search-form {
    margin: 0;
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-primary);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.8);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 40px 20px;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Client Form Styles */
.client-form {
    max-width: none;
}

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

.form-section {
    background: rgba(71, 85, 105, 0.2);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(71, 85, 105, 0.3);
}

.form-section h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

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

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-primary);
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(71, 85, 105, 0.5);
    border-radius: 4px;
    position: relative;
    background: rgba(30, 41, 59, 0.8);
}

.help-text {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.btn-block {
    width: 100%;
}

/* Link Groups */
.links-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.link-group {
    background: rgba(30, 41, 59, 0.5);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(71, 85, 105, 0.3);
}

.link-group label {
    margin-bottom: 5px;
    margin-top: 10px;
}

.link-group label:first-child {
    margin-top: 0;
}

/* Checkbox and Radio Groups */
.checkbox-group, .radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-primary);
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(71, 85, 105, 0.5);
    border-radius: 50%;
    position: relative;
    background: rgba(30, 41, 59, 0.8);
}

.radio-custom::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s;
}

input[type="radio"]:checked + .radio-custom::after {
    opacity: 1;
}

input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-color);
    font-weight: bold;
}

/* Hide default radio and checkbox */
input[type="radio"], input[type="checkbox"] {
    display: none;
}

/* Multiple select styling */
select[multiple] {
    min-height: 120px;
}

/* Error page styles */
.error-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

/* Client Detail Styling */
.client-geo {
    margin: 15px 0;
    background: rgba(59, 130, 246, 0.1);
    padding: 10px;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.geo-item {
    color: var(--text-secondary);
    margin: 5px 0;
}

.shipping-info, .escrow-info {
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ship-badge, .escrow-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.ship-badge.spa-world {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.ship-badge.ita-ita {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.ship-badge.none {
    background: rgba(107, 114, 128, 0.2);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

.escrow-badge.yes {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.escrow-badge.no {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.client-contact {
    margin: 15px 0;
}

.client-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.client-notes {
    background: rgba(71, 85, 105, 0.3);
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
}

.client-notes p {
    margin: 5px 0 0;
    color: var(--text-secondary);
    font-style: italic;
}

.admin-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(71, 85, 105, 0.3);
    flex-wrap: wrap;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.9rem;
}

/* JSON Filter */
.filter-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: normal;
}

/* Mobile Responsive Improvements */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .header-actions {
        justify-content: center;
    }
    
    .search-grid {
        grid-template-columns: 1fr;
    }
    
    .clients-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .links-container {
        grid-template-columns: 1fr;
    }
    
    .admin-actions {
        justify-content: center;
    }
    
    .client-links {
        justify-content: center;
    }
    
    .client-contacts {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .card {
        margin-bottom: 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .admin-actions .btn {
        width: auto;
        flex: 1;
    }
}

/* Telegram WebApp Integration */
.webapp-header {
    background: var(--tg-theme-bg-color, var(--bg-primary));
    color: var(--tg-theme-text-color, var(--text-primary));
    border-bottom: 1px solid var(--tg-theme-hint-color, rgba(71, 85, 105, 0.3));
}

/* Touch-friendly buttons for mobile */
@media (hover: none) and (pointer: coarse) {
    .btn, .contact-btn {
        min-height: 44px;
        padding: 12px 16px;
    }
    
    .form-control {
        min-height: 44px;
        padding: 12px;
    }
    
    select[multiple] {
        min-height: 150px;
    }
}

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

.login-logo-container {
    margin-bottom: 20px;
}

.login-logo-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    border: 4px solid rgba(99, 102, 241, 0.2);
}

.login-logo-fallback {
    font-size: 4.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.3));
}

.info-card {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.5);
    color: var(--text-secondary);
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.info-icon {
    margin-right: 12px;
    font-size: 1.2rem;
}

.login-footer {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.stat-icon {
    font-size: 1.5rem;
    margin-right: 12px;
}

.stat-text {
    font-size: 0.95rem;
    font-weight: 500;
}

/* Sponsor Management Styles */
.sponsor-list {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 20px;
}

.sponsor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    margin-bottom: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.sponsor-info {
    flex: 1;
}

.sponsor-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.sponsor-location {
    font-size: 0.85rem;
    opacity: 0.8;
}

.sponsor-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
    min-width: auto;
    width: auto;
    margin: 0;
}

.sponsor-form {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.form-control-small {
    padding: 10px 12px;
    font-size: 0.9rem;
    width: 100%;
    margin-bottom: 0;
}

/* Enhanced animations */
.pulse {
    animation: pulse 2s infinite;
}

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

.bounce {
    animation: bounce 1s ease-in-out;
}

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

/* Loading spinner improvements */
.spinner {
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

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

.modal-content {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    margin: 5% auto;
    padding: 32px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(255,255,255,0.2);
}

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

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: #000;
    transform: scale(1.1);
}

/* Responsive improvements */
@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .sponsor-item {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .sponsor-actions {
        width: 100%;
        justify-content: center;
    }
}

/* Alert messages */
.alert {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    border: 1px solid transparent;
}

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

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

/* Action buttons grid */
.action-grid {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive design */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
        padding: 30px;
    }
    
    .action-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    .header h1 {
        font-size: 2.2rem;
    }
    
    .logo {
        font-size: 4rem;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

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

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.stat-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
    display: block;
}

.stat-text {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.9;
}

/* Sponsor Management */
.sponsors-container {
    padding: 20px 0;
}

.sponsor-item {
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.sponsor-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.sponsor-info {
    flex: 1;
}

.sponsor-name {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.sponsor-location {
    font-size: 0.85rem;
    color: #64748b;
}

.sponsor-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 8px;
    width: auto;
    margin-bottom: 0;
}

.sponsor-form {
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    backdrop-filter: blur(20px);
}

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

@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .sponsor-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .sponsor-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Hamburger Menu Styles */
.hamburger-menu {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hamburger-menu:hover {
    background: rgba(30, 144, 255, 0.2);
    transform: scale(1.05);
}

.hamburger-menu svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: var(--logo-charcoal);
    backdrop-filter: blur(20px);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
    transition: right 0.3s ease;
    z-index: 999;
    overflow-y: auto;
}

.sidebar.active {
    right: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.close-sidebar {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 28px;
    cursor: pointer;
    transition: var(--transition);
}

.close-sidebar:hover {
    color: var(--logo-blue);
    transform: rotate(90deg);
}

.sidebar-content {
    padding: 20px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
}

.sidebar-link:hover {
    background: rgba(30, 144, 255, 0.2);
    border-color: var(--logo-blue);
    transform: translateX(5px);
    text-decoration: none;
    color: var(--text-primary);
}

.sidebar-icon {
    font-size: 1.5rem;
    margin-right: 15px;
    display: inline-block;
    width: 30px;
    text-align: center;
}

/* Navigation improvements */
.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hamburger-menu {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }
    
    .sidebar {
        width: 250px;
        right: -250px;
    }
    
    .header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .header-actions .btn {
        width: 100%;
    }
}
