/* VVS Growth Color Palette Variables */
:root {
    --primary-yellow: #e5d123;
    --secondary-yellow: #978806;
    --dark-green: #1a1704;
    --medium-green: #665b05;
    --light-yellow: #b1a62b;
    --olive-green: #796e07;
    --dark-olive: #4f4705;
ke     --neutral-gray: #9b9988;
    --accent-yellow: #bc9c05;
    --white: #ffffff;
}

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

/* Mobile touch improvements */
@media (pointer: coarse) {
    .btn, .nav-link, .search-input, .filter-select {
        min-height: 44px;
    }
    
    .btn-sm {
        min-height: 40px;
    }
}

/* Prevent horizontal scrolling on mobile */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--dark-green) 0%, var(--medium-green) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.login-container {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 32px;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.15), 0 8px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    width: 100%;
    max-width: 420px;
    padding: 0;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.login-header {
    background: linear-gradient(135deg, var(--primary-yellow) 0%, var(--accent-yellow) 100%);
    padding: 48px 36px 36px;
    text-align: center;
    color: var(--dark-green);
    border-radius: 32px 32px 0 0;
}

.logo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    margin: 0 auto 24px;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
    object-fit: cover;
}

.login-title {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 8px;
    text-shadow: none;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 15px;
    opacity: 0.75;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.login-form {
    padding: 48px 36px;
    background: transparent;
}

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

.form-label {
    display: block;
    margin-bottom: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    letter-spacing: 0.3px;
}

.form-input {
    width: 100%;
    padding: 18px 24px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    backdrop-filter: blur(12px);
    font-weight: 400;
}

.form-input:focus {
    outline: none;
    border-color: rgba(229, 209, 35, 0.8);
    box-shadow: 0 0 0 4px rgba(229, 209, 35, 0.15), 0 8px 24px rgba(229, 209, 35, 0.1);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
    scale: 1.02;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

.login-button {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--primary-yellow) 0%, var(--accent-yellow) 100%);
    color: var(--dark-green);
    border: none;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: none;
    letter-spacing: 0.2px;
    margin-top: 16px;
    box-shadow: 0 8px 24px rgba(229, 209, 35, 0.25), 0 4px 12px rgba(229, 209, 35, 0.15);
}

.login-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(229, 209, 35, 0.35), 0 6px 18px rgba(229, 209, 35, 0.2);
    scale: 1.02;
}

.login-button:active {
    transform: translateY(-1px);
    scale: 0.98;
}

.error-message {
    background: linear-gradient(135deg, var(--dark-olive) 0%, var(--dark-green) 100%);
    color: var(--light-yellow);
    padding: 15px;
    border-radius: 24px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
    animation: shake 0.5s ease-in-out;
}

.success-message {
    background: linear-gradient(135deg, var(--secondary-yellow) 0%, var(--olive-green) 100%);
    color: var(--white);
    padding: 15px;
    border-radius: 24px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}

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

.forgot-password {
    text-align: center;
    margin-top: 28px;
}

.forgot-password a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 400;
    transition: all 0.3s ease;
    font-size: 14px;
    letter-spacing: 0.2px;
}

.forgot-password a:hover {
    color: var(--primary-yellow);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

/* Field Error Messages */
.field-error {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: var(--white);
    padding: 8px 12px;
    border-radius: 20px;
    margin-top: 8px;
    font-size: 14px;
    animation: shake 0.5s ease-in-out;
}

/* Help Text */
.help-text {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--neutral-gray);
}

.help-text p {
    color: var(--medium-green);
    font-size: 14px;
    opacity: 0.8;
}

/* Password Requirements */
.password-requirements {
    margin-top: 15px;
    padding: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    border-left: 4px solid var(--primary-yellow);
}

.password-requirements p {
    color: var(--medium-green);
    font-size: 14px;
    margin: 0;
}

/* Button Group */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.button-group .login-button {
    margin-top: 0;
}

.button-group .forgot-password {
    margin-top: 0;
}

/* Responsive Design */
/* Tablet Responsive */
@media (max-width: 1024px) and (min-width: 769px) {
    .admin-sidebar {
        width: 240px;
    }

    .admin-main {
        margin-left: 252px;
    }

    .admin-content {
        padding: 24px 20px;
    }

    .data-table {
        overflow-x: auto;
        white-space: nowrap;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
        font-size: 12px;
        white-space: nowrap;
        min-width: 80px;
    }

    .data-table th:first-child,
    .data-table td:first-child {
        min-width: 40px;
    }

    .data-table th:nth-child(2),
    .data-table td:nth-child(2) {
        min-width: 120px;
    }

    .data-table th:nth-child(3),
    .data-table td:nth-child(3) {
        min-width: 140px;
        max-width: 160px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .data-table th:last-child,
    .data-table td:last-child {
        min-width: 120px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .btn-group {
        flex-direction: row;
        gap: 4px;
    }

    .btn-sm {
        padding: 6px 8px;
        font-size: 11px;
    }
}


/* Cross-browser form normalization */
input, select, textarea, button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
}

/* Normalize form controls for Safari */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="datetime-local"],
input[type="date"],
input[type="time"],
input[type="search"],
input[type="url"],
input[type="number"],
select,
textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-clip: padding-box;
    -webkit-background-clip: padding-box;
}

/* Remove Safari's inner shadows and other default styling */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="datetime-local"],
input[type="date"],
input[type="time"],
select,
textarea {
    -webkit-box-shadow: none;
    box-shadow: none;
    -webkit-border-radius: 50px;
    border-radius: 50px;
}

/* Ensure consistent box model */
*, *:before, *:after {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* Fix iOS zoom on form focus */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    select,
    textarea,
    input[type="text"],
    input[type="password"],
    input[type="datetime"],
    input[type="datetime-local"],
    input[type="date"],
    input[type="month"],
    input[type="time"],
    input[type="week"],
    input[type="number"],
    input[type="email"],
    input[type="url"],
    input[type="search"],
    input[type="tel"],
    input[type="color"] {
        font-size: 16px;
    }
}

/* Ensure all input fields have very round borders */
input[type="text"],
input[type="email"], 
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
select,
textarea,
.form-input,
.form-field input,
.form-field select,
.form-field textarea,
.search-input,
.filter-select {
    border-radius: 50px !important;
    -webkit-border-radius: 50px !important;
    -moz-border-radius: 50px !important;
}

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

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Admin Dashboard Styles */
.admin-dashboard {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--dark-green) 0%, var(--medium-green) 100%);
}

.admin-sidebar {
    width: 280px;
    background: rgba(26, 23, 4, 0.95);
    border-right: none;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.12), 4px 0 16px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    backdrop-filter: blur(20px);
    border-radius: 0 24px 24px 0;
    margin: 12px 0;
    height: calc(100vh - 24px);
}

.admin-sidebar.collapsed {
    width: 70px;
}

.sidebar-header {
    padding: 32px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    margin-bottom: 16px;
}

.sidebar-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin: 0 auto 18px;
    border: 2px solid rgba(229, 209, 35, 0.8);
    box-shadow: 0 8px 24px rgba(229, 209, 35, 0.15);
}

.sidebar-title {
    color: var(--primary-yellow);
    font-size: 17px;
    font-weight: 600;
    margin: 0;
    transition: opacity 0.4s ease;
    letter-spacing: 0.3px;
}

.collapsed .sidebar-title {
    opacity: 0;
    display: none;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-section {
    margin-bottom: 30px;
}

.nav-section-title {
    color: rgba(177, 166, 43, 0.8);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 0 24px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 16px;
    transition: opacity 0.4s ease;
}

.collapsed .nav-section-title {
    opacity: 0;
    display: none;
}

.nav-item {
    margin-bottom: 4px;
    padding: 0 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px;
    border: none;
    font-weight: 400;
    font-size: 14px;
}

.nav-link:hover {
    background: rgba(229, 209, 35, 0.12);
    color: var(--primary-yellow);
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(229, 209, 35, 0.1);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary-yellow) 0%, var(--accent-yellow) 100%);
    color: var(--dark-green);
    font-weight: 500;
    box-shadow: 0 6px 20px rgba(229, 209, 35, 0.25), 0 3px 10px rgba(229, 209, 35, 0.15);
    transform: translateX(4px);
}

.nav-icon {
    font-size: 18px;
    margin-right: 14px;
    width: 20px;
    text-align: center;
    transition: all 0.4s ease;
}

.collapsed .nav-icon {
    margin-right: 0;
}

.nav-text {
    transition: opacity 0.3s ease;
}

.collapsed .nav-text {
    opacity: 0;
    display: none;
}

.admin-main {
    flex: 1;
    margin-left: 292px;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.4s ease;
    padding: 12px 12px 0 0;
    max-width: calc(100vw - 304px);
    overflow-x: hidden;
}

.collapsed ~ .admin-main {
    margin-left: 70px;
    max-width: calc(100vw - 82px);
}

.admin-navbar {
    background: rgba(255, 255, 255, 0.08);
    padding: 20px 32px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.15), 0 8px 24px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(20px);
    margin-bottom: 24px;
}

.navbar-left {
    display: flex;
    align-items: center;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    margin-right: 24px;
    padding: 12px;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-toggle:hover {
    background: rgba(229, 209, 35, 0.15);
    color: var(--primary-yellow);
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(229, 209, 35, 0.15);
}

.navbar-title {
    color: var(--white);
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.3px;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-badge {
    background: linear-gradient(135deg, var(--primary-yellow) 0%, var(--accent-yellow) 100%);
    color: var(--dark-green);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 4px 16px rgba(229, 209, 35, 0.25), 0 2px 8px rgba(229, 209, 35, 0.15);
}

.notification-icon {
    position: relative;
    background: none;
    border: none;
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    padding: 12px;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-icon:hover {
    background: rgba(229, 209, 35, 0.15);
    color: var(--primary-yellow);
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(229, 209, 35, 0.15);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: linear-gradient(135deg, var(--accent-yellow) 0%, var(--secondary-yellow) 100%);
    color: var(--dark-green);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(188, 156, 5, 0.3);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-name {
    color: var(--white);
    font-weight: 600;
}

.logout-button {
    background: linear-gradient(135deg, var(--primary-yellow) 0%, var(--accent-yellow) 100%);
    color: var(--dark-green);
    border: none;
    padding: 10px 20px;
    border-radius: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 0.2px;
    box-shadow: 0 4px 16px rgba(229, 209, 35, 0.25), 0 2px 8px rgba(229, 209, 35, 0.15);
}

.logout-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(229, 209, 35, 0.35), 0 3px 10px rgba(229, 209, 35, 0.2);
}

.admin-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 24px 0 0 0;
    background: rgba(255, 255, 255, 0.02);
    max-width: 100%;
    width: 100%;
}

.content-header {
    margin-bottom: 32px;
    padding: 24px 0;
}

.content-title {
    color: var(--white);
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.4px;
}

.content-subtitle {
    color: rgba(177, 166, 43, 0.85);
    font-size: 15px;
    opacity: 0.9;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.admin-card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 28px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.08);
    color: var(--dark-green);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-card:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 12px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(177, 166, 43, 0.2);
}

.card-title {
    font-size: 19px;
    font-weight: 600;
    color: var(--dark-green);
    margin: 0;
    letter-spacing: -0.2px;
}

.card-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    align-items: center;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.2px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-sm {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 12px;
    min-width: auto;
}

.btn-group {
    display: flex;
    gap: 4px;
    align-items: center;
}

.btn-group .btn {
    margin: 0;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-yellow) 0%, var(--accent-yellow) 100%);
    color: var(--dark-green);
    box-shadow: 0 6px 20px rgba(229, 209, 35, 0.25), 0 3px 10px rgba(229, 209, 35, 0.15);
}

.btn-secondary {
    background: rgba(102, 91, 5, 0.9);
    color: var(--white);
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 20px rgba(102, 91, 5, 0.2), 0 3px 10px rgba(102, 91, 5, 0.1);
}

.btn-success {
    background: linear-gradient(135deg, var(--secondary-yellow) 0%, var(--olive-green) 100%);
    color: var(--white);
    box-shadow: 0 6px 20px rgba(151, 136, 6, 0.25), 0 3px 10px rgba(151, 136, 6, 0.15);
}

.btn-danger {
    background: rgba(79, 71, 5, 0.9);
    color: var(--light-yellow);
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 20px rgba(79, 71, 5, 0.25), 0 3px 10px rgba(79, 71, 5, 0.15);
}

.btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.03);
    table-layout: fixed;
}

/* Table wrapper for better scrolling on larger tablets */
.table-wrapper {
    overflow-x: auto;
    border-radius: 16px;
    -webkit-overflow-scrolling: touch;
}

.data-table th,
.data-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(177, 166, 43, 0.15);
}

/* Email column specific styling */
.data-table td:nth-child(3) {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-table th {
    background: linear-gradient(135deg, rgba(177, 166, 43, 0.15) 0%, rgba(229, 209, 35, 0.1) 100%);
    color: var(--dark-green);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.8px;
    backdrop-filter: blur(10px);
}

.data-table tr:hover {
    background: rgba(229, 209, 35, 0.08);
    transform: scale(1.001);
    transition: all 0.3s ease;
}

.status-badge {
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.status-ready {
    background: var(--secondary-yellow);
    color: var(--white);
}

.status-running {
    background: var(--primary-yellow);
    color: var(--dark-green);
}

.status-error {
    background: var(--dark-olive);
    color: var(--white) !important;
}

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

.status-paused {
    background: var(--neutral-gray);
    color: var(--white);
}

.search-filters {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    align-items: center;
    flex-wrap: wrap;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.search-input {
    padding: 14px 20px;
    border: 1.5px solid rgba(177, 166, 43, 0.3);
    border-radius: 50px;
    font-size: 14px;
    flex: 1;
    min-width: 220px;
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-family: inherit;
    line-height: 1.5;
    box-sizing: border-box;
    -webkit-border-radius: 50px;
    min-height: 48px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-yellow);
    box-shadow: 0 0 0 3px rgba(229, 209, 35, 0.15), 0 4px 16px rgba(229, 209, 35, 0.1);
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 1);
}

.filter-select {
    padding: 14px 20px;
    border: 1.5px solid rgba(177, 166, 43, 0.3);
    border-radius: 50px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-family: inherit;
    line-height: 1.5;
    box-sizing: border-box;
    -webkit-border-radius: 50px;
    min-height: 48px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23665b05' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 48px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Reset body and html for mobile */
    body, html {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }

    .admin-dashboard {
        min-height: 100vh;
        width: 100%;
        overflow-x: hidden;
    }

    .admin-sidebar {
        width: 280px;
        transform: translateX(-100%);
        position: fixed;
        z-index: 1001;
        border-radius: 0;
        margin: 0;
        height: 100vh;
        box-shadow: 12px 0 40px rgba(0, 0, 0, 0.15);
        top: 0;
        left: 0;
    }

    .admin-sidebar.mobile-open {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
        padding: 0;
        width: 100%;
        min-height: 100vh;
    }

    .admin-content {
        padding: 12px 8px;
        border-radius: 0;
        min-height: calc(100vh - 96px);
    }

    .admin-navbar {
        padding: 12px 16px;
        border-radius: 16px;
        margin: 8px;
        position: sticky;
        top: 8px;
        z-index: 100;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(20px);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 4px 16px rgba(0, 0, 0, 0.08);
    }

    .navbar-title {
        font-size: 16px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .navbar-right {
        gap: 8px;
    }

    .user-name {
        display: none;
    }

    .admin-badge {
        padding: 6px 12px;
        font-size: 10px;
        border-radius: 16px;
    }

    .content-header {
        margin-bottom: 16px;
        padding: 12px 0;
    }

    .content-title {
        font-size: 18px;
        letter-spacing: -0.2px;
        line-height: 1.3;
    }

    .content-subtitle {
        font-size: 13px;
        margin-top: 4px;
    }

    .search-filters {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        gap: 10px;
        border-radius: 12px;
        margin-bottom: 16px;
    }

    .search-input, .filter-select {
        min-width: auto;
        width: 100%;
        padding: 12px 14px;
        border-radius: 50px;
        font-size: 16px;
    }

    .filter-form {
        flex-direction: column;
        gap: 10px;
    }

    .filter-form .btn {
        width: 100%;
        margin-top: 8px;
    }

    /* Mobile Table Styles */
    .data-table {
        display: block;
        width: 100%;
        border-radius: 12px;
        overflow: hidden;
        margin-top: 16px;
    }

    .data-table thead {
        display: none;
    }

    .data-table tbody {
        display: block;
        width: 100%;
    }

    .data-table tr {
        display: block;
        margin-bottom: 12px;
        background: rgba(255, 255, 255, 0.98);
        border-radius: 12px;
        padding: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        border: 1px solid rgba(177, 166, 43, 0.15);
        position: relative;
    }

    .data-table tr:hover {
        transform: none;
        background: rgba(255, 255, 255, 1);
    }

    .data-table td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 8px 0;
        border: none;
        font-size: 14px;
        min-height: 24px;
        flex-wrap: wrap;
        word-break: break-word;
    }

    .data-table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--dark-green);
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-right: 8px;
        min-width: 100px;
        flex-shrink: 0;
        flex-basis: 100px;
    }

    .data-table td:last-child {
        padding-top: 16px;
        margin-top: 8px;
        border-top: 1px solid rgba(177, 166, 43, 0.2);
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }

    .data-table td:last-child:before {
        content: "Azioni";
        text-align: center;
        width: 100%;
        margin-bottom: 8px;
        min-width: auto;
    }

    /* Empty state mobile fix */
    .empty-state {
        text-align: center;
        padding: 24px 16px;
        color: var(--neutral-gray);
    }

    .empty-state i {
        font-size: 32px;
        margin-bottom: 12px;
        opacity: 0.5;
    }

    /* Mobile Button Groups */
    .btn-group {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .btn-group .btn {
        width: 100%;
        text-align: center;
        min-width: auto;
        justify-content: center;
    }

    .btn {
        padding: 12px 16px;
        font-size: 14px;
        border-radius: 12px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .btn-sm {
        padding: 10px 14px;
        font-size: 13px;
        min-height: 40px;
    }

    /* Mobile Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-bottom: 16px;
    }

    .stat-card {
        background: linear-gradient(135deg, var(--light-yellow) 0%, var(--primary-yellow) 100%);
        padding: 12px 8px;
        border-radius: 12px;
        text-align: center;
        min-height: auto;
        position: relative;
        overflow: hidden;
        color: var(--dark-green);
        box-shadow: 0 4px 16px rgba(177, 166, 43, 0.15), 0 2px 8px rgba(177, 166, 43, 0.1);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(177, 166, 43, 0.2), 0 3px 10px rgba(177, 166, 43, 0.15);
    }

    .stat-number {
        font-size: 18px;
        margin-bottom: 4px;
        line-height: 1.0;
        font-weight: 700;
        color: var(--dark-green);
    }

    .stat-label {
        font-size: 10px;
        line-height: 1.1;
        margin-bottom: 8px;
        opacity: 0.8;
        color: var(--dark-green);
        font-weight: 500;
    }

    .stat-icon {
        margin-top: 4px;
        font-size: 14px;
        opacity: 0.6;
        color: var(--dark-green);
    }

    /* Mobile Cards */
    .admin-card {
        padding: 16px 12px;
        margin-bottom: 16px;
        border-radius: 12px;
    }

    .card-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 16px;
        text-align: center;
    }

    .card-title {
        font-size: 16px;
        margin-bottom: 0;
    }

    .card-actions {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .card-actions .btn {
        flex: 1;
        min-width: 120px;
    }

    /* Mobile Navigation */
    .nav-link {
        padding: 14px 16px;
        font-size: 14px;
        border-radius: 12px;
    }

    .nav-icon {
        font-size: 18px;
        margin-right: 12px;
        width: 20px;
    }

    /* Mobile Form Styles */
    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .form-field {
        margin-bottom: 16px;
    }

    .form-field input,
    .form-field select,
    .form-field textarea {
        padding: 14px 16px;
        font-size: 16px;
        border-radius: 50px;
        width: 100%;
        min-height: 48px;
    }

    .form-field label {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .action-buttons {
        flex-direction: column;
        gap: 12px;
        padding: 16px 0;
        margin-top: 20px;
    }

    .action-buttons .btn {
        width: 100%;
        min-height: 48px;
    }

    /* Mobile Chart Styles */
    .chart-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .chart-container {
        height: 250px;
        margin-bottom: 16px;
    }

    /* Mobile Sidebar Improvements */
    .nav-section {
        margin-bottom: 16px;
    }

    .nav-section-title {
        font-size: 10px;
        padding: 0 16px 6px;
        margin-bottom: 8px;
    }

    .sidebar-header {
        padding: 20px 16px;
        margin-bottom: 12px;
    }

    .sidebar-logo {
        width: 40px;
        height: 40px;
        margin-bottom: 12px;
    }

    .sidebar-title {
        font-size: 16px;
    }

    /* Mobile Pagination */
    .pagination-container {
        flex-direction: column;
        gap: 12px;
        align-items: center;
        text-align: center;
        padding: 16px;
        margin-top: 16px;
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }

    .pagination-link {
        padding: 8px 12px;
        font-size: 13px;
        border-radius: 8px;
        min-width: 40px;
    }

    .pagination-info {
        font-size: 13px;
        margin-top: 8px;
    }
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

@media (max-width: 768px) {
    .mobile-overlay.active {
        display: block;
    }

    /* Additional mobile fixes */
    .status-badge {
        padding: 4px 12px;
        font-size: 10px;
        border-radius: 12px;
    }
    
    /* Mobile email column improvements */
    .data-table td:nth-child(3) {
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .info-section {
        margin-bottom: 20px;
        padding: 16px;
        border-radius: 12px;
    }

    .info-section h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .info-item {
        padding: 8px 0;
        border-bottom: 1px solid rgba(177, 166, 43, 0.1);
    }

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

    .info-label {
        font-size: 11px;
        margin-bottom: 4px;
    }

    .info-value {
        font-size: 14px;
        word-break: break-word;
    }
}

/* Small Mobile Phones (max-width: 480px) */
@media (max-width: 480px) {
    /* Login form responsive styles */
    .login-container {
        margin: 12px;
        max-width: calc(100% - 24px);
        border-radius: 20px;
    }

    .login-header {
        padding: 28px 20px 20px;
        border-radius: 20px 20px 0 0;
    }

    .logo {
        width: 80px;
        height: 80px;
    }

    .login-title {
        font-size: 22px;
    }

    .login-form {
        padding: 28px 20px;
    }

    /* Admin layout styles */
    .admin-content {
        padding: 8px 4px;
        min-height: calc(100vh - 88px);
    }

    .admin-navbar {
        padding: 10px 12px;
        border-radius: 16px;
        margin: 6px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(20px);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 4px 16px rgba(0, 0, 0, 0.08);
    }

    .sidebar-toggle {
        padding: 8px;
        font-size: 16px;
    }

    .navbar-title {
        font-size: 14px;
    }

    .content-title {
        font-size: 16px;
    }

    .content-subtitle {
        font-size: 12px;
    }

    .admin-card {
        padding: 12px 8px;
        margin-bottom: 12px;
    }

    .card-header {
        gap: 8px;
        margin-bottom: 12px;
    }

    .card-title {
        font-size: 14px;
    }

    .search-filters {
        padding: 8px;
        gap: 8px;
    }

    .search-input, .filter-select {
        padding: 10px 12px;
        font-size: 14px;
    }

    .btn {
        padding: 10px 12px;
        font-size: 13px;
        min-height: 40px;
    }

    .btn-sm {
        padding: 8px 10px;
        font-size: 12px;
        min-height: 36px;
    }

    .data-table tr {
        padding: 12px;
        margin-bottom: 8px;
    }

    .data-table td {
        font-size: 13px;
        padding: 6px 0;
    }

    .data-table td:before {
        font-size: 11px;
        min-width: 70px;
    }
    
    /* Better mobile handling for email and password columns */
    .data-table td:nth-child(3) {
        max-width: 120px;
        font-size: 11px;
    }
    
    /* Better mobile status badge styling */
    .status-badge {
        font-size: 9px;
        padding: 3px 8px;
        border-radius: 10px;
    }

    .stats-grid {
        gap: 6px;
        margin-bottom: 12px;
    }

    .stat-card {
        background: linear-gradient(135deg, var(--light-yellow) 0%, var(--primary-yellow) 100%);
        padding: 10px 6px;
        border-radius: 10px;
        color: var(--dark-green);
        box-shadow: 0 3px 12px rgba(177, 166, 43, 0.12), 0 1px 6px rgba(177, 166, 43, 0.08);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .stat-card:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 16px rgba(177, 166, 43, 0.18), 0 2px 8px rgba(177, 166, 43, 0.12);
    }

    .stat-number {
        font-size: 16px;
        margin-bottom: 3px;
        color: var(--dark-green);
        font-weight: 700;
    }

    .stat-label {
        font-size: 9px;
        line-height: 1.1;
        margin-bottom: 6px;
        color: var(--dark-green);
        opacity: 0.8;
        font-weight: 500;
    }

    .stat-icon {
        margin-top: 2px;
        font-size: 12px;
        opacity: 0.6;
        color: var(--dark-green);
    }

    .form-field input,
    .form-field select,
    .form-field textarea {
        padding: 12px 14px;
        font-size: 15px;
        min-height: 44px;
    }

    .action-buttons {
        gap: 8px;
        padding: 12px 0;
    }

    .action-buttons .btn {
        min-height: 44px;
    }

    /* Modal improvements for small screens */
    .modal-content {
        margin: 4px;
        max-width: calc(100% - 8px);
        border-radius: 16px;
    }

    .modal-header,
    .modal-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .modal-header {
        padding-top: 20px;
        margin-bottom: 16px;
    }

    .modal-title {
        font-size: 16px;
    }

    .modal-body {
        padding-bottom: 20px;
    }

    /* Navigation improvements */
    .nav-link {
        padding: 12px 14px;
        font-size: 13px;
    }

    .nav-icon {
        font-size: 16px;
        margin-right: 10px;
        width: 18px;
    }

    .sidebar-header {
        padding: 16px 12px;
    }

    .nav-section-title {
        font-size: 9px;
        padding: 0 14px 4px;
    }
}

/* Modal Styles - All modals will be automatically centered
   
   To ensure modal centering works in JavaScript, add this code to pages with modals:
   
   // Universal modal centering function
   window.openModal = function(modalId) {
       const modal = document.getElementById(modalId);
       if (modal) {
           modal.style.display = 'flex';
           modal.style.alignItems = 'center';
           modal.style.justifyContent = 'center';
       }
   };
   
   // Monitor for modal style changes and auto-center
   const observer = new MutationObserver(function(mutations) {
       mutations.forEach(function(mutation) {
           if (mutation.type === 'attributes' && mutation.attributeName === 'style') {
               const modal = mutation.target;
               if (modal.classList.contains('modal') && 
                   modal.style.display && 
                   modal.style.display !== 'none') {
                   modal.style.display = 'flex';
                   modal.style.alignItems = 'center';
                   modal.style.justifyContent = 'center';
               }
           }
       });
   });
   
   document.querySelectorAll('.modal').forEach(modal => {
       observer.observe(modal, { attributes: true, attributeFilter: ['style'] });
   });
*/
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    overflow-y: auto;
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal.show {
    display: flex;
}

/* Ensure modal is displayed as flex when shown */
.modal[style*="display: block"],
.modal[style*="display: flex"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Force centering for any visible modal - only when explicitly shown */
.modal.show:not([style*="display: none"]) {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Legacy support for modals that might use table-cell display */
.modal-wrapper {
    display: table;
    width: 100%;
    height: 100%;
}

.modal-wrapper .modal-content {
    display: table-cell;
    vertical-align: middle;
    text-align: center;
}

.modal-wrapper .modal-content > div {
    display: inline-block;
    text-align: left;
}

.modal-content {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 920px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin: auto;
    flex-shrink: 0;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 36px 0;
    border-bottom: 1px solid rgba(177, 166, 43, 0.2);
    margin-bottom: 28px;
}

.modal-title {
    color: var(--dark-green);
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.3px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: rgba(155, 153, 136, 0.8);
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close:hover {
    background: rgba(229, 209, 35, 0.15);
    color: var(--dark-green);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(229, 209, 35, 0.2);
}

.modal-body {
    padding: 0 36px 36px;
    color: var(--dark-green);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
    max-width: 100%;
}

.stat-card {
    background: linear-gradient(135deg, var(--light-yellow) 0%, var(--primary-yellow) 100%);
    padding: 28px 24px;
    border-radius: 20px;
    text-align: center;
    color: var(--dark-green);
    box-shadow: 0 8px 24px rgba(177, 166, 43, 0.15), 0 4px 12px rgba(177, 166, 43, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-number {
    font-size: 30px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 13px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 500;
}

.info-section {
    margin-bottom: 32px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.info-section h3 {
    color: var(--dark-green);
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(177, 166, 43, 0.3);
    letter-spacing: -0.2px;
}

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

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--medium-green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.info-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--dark-green);
}

.action-buttons {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 20px 0;
}

.modal-form {
    display: grid;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.form-field label {
    font-size: 13px;
    font-weight: 500;
    color: var(--dark-green);
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

.form-field input,
.form-field select,
.form-field textarea {
    padding: 16px 20px;
    border: 1.5px solid rgba(177, 166, 43, 0.3);
    border-radius: 50px;
    font-size: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-family: inherit;
    line-height: 1.5;
    color: var(--dark-green);
}

/* Safari specific fixes */
.form-field select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23665b05' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 48px;
    cursor: pointer;
}

/* iOS Safari specific fixes */
.form-field input,
.form-field select,
.form-field textarea {
    -webkit-border-radius: 50px;
    -webkit-box-sizing: border-box;
    -webkit-background-clip: padding-box;
    background-clip: padding-box;
}

/* Remove Safari's default styling */
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field input[type="password"],
.form-field input[type="datetime-local"],
.form-field input[type="date"],
.form-field input[type="time"],
.form-field select,
.form-field textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 50px;
    background-color: rgba(255, 255, 255, 0.95);
    min-height: 54px;
    display: block;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--primary-yellow);
    box-shadow: 0 0 0 3px rgba(229, 209, 35, 0.15), 0 4px 16px rgba(229, 209, 35, 0.1);
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 1);
    -webkit-box-shadow: 0 0 0 3px rgba(229, 209, 35, 0.15), 0 4px 16px rgba(229, 209, 35, 0.1);
}

.campaigns-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--light-yellow);
    border-radius: 8px;
    padding: 15px;
}

.campaign-item {
    padding: 20px;
    border: 1px solid rgba(177, 166, 43, 0.2);
    border-radius: 16px;
    margin-bottom: 12px;
    background: rgba(229, 209, 35, 0.08);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.campaign-item:last-child {
    margin-bottom: 0;
}

.campaign-name {
    font-weight: 600;
    color: var(--dark-green);
    margin-bottom: 8px;
    letter-spacing: -0.1px;
}

.campaign-details {
    font-size: 14px;
    color: var(--medium-green);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

@media (max-width: 768px) {
    .modal-content {
        margin: 12px;
        max-width: calc(100% - 24px);
        border-radius: 20px;
    }

    .modal-header,
    .modal-body {
        padding-left: 24px;
        padding-right: 24px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    /* Modal stats in mobile */
    .modal-body .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-bottom: 16px;
    }

    .modal-body .stat-card {
        background: linear-gradient(135deg, var(--light-yellow) 0%, var(--primary-yellow) 100%);
        padding: 12px 8px;
        border-radius: 10px;
        color: var(--dark-green);
        box-shadow: 0 4px 16px rgba(177, 166, 43, 0.15), 0 2px 8px rgba(177, 166, 43, 0.1);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .modal-body .stat-card:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(177, 166, 43, 0.2), 0 3px 10px rgba(177, 166, 43, 0.15);
    }

    .modal-body .stat-number {
        font-size: 18px;
        margin-bottom: 4px;
        color: var(--dark-green);
        font-weight: 700;
    }

    .modal-body .stat-label {
        font-size: 10px;
        line-height: 1.2;
        color: var(--dark-green);
        opacity: 0.8;
        font-weight: 500;
        margin-bottom: 6px;
    }

    .modal-body .stat-icon {
        margin-top: 4px;
        font-size: 14px;
        opacity: 0.6;
        color: var(--dark-green);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    /* Make charts responsive on mobile */
    .modal-body div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* Chart containers */
.chart-container {
    position: relative;
    height: 200px;
    width: 100%;
}

.chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

/* Dashboard specific styles */
.recent-activity {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--light-yellow);
    transition: background-color 0.3s ease;
}

.activity-item:hover {
    background-color: rgba(229, 209, 35, 0.1);
}

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

.activity-icon {
    font-size: 24px;
    margin-right: 15px;
    width: 40px;
    text-align: center;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    color: var(--dark-green);
    margin-bottom: 5px;
}

.activity-time {
    font-size: 12px;
    color: var(--medium-green);
    opacity: 0.8;
}

.system-status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(229, 209, 35, 0.1);
    border-radius: 8px;
    border: 1px solid var(--light-yellow);
}

.status-label {
    font-weight: 600;
    color: var(--dark-green);
}

.status-indicator {
    font-size: 14px;
    font-weight: 500;
}

.status-good {
    color: var(--secondary-yellow);
}

.status-warning {
    color: var(--primary-yellow);
}

.status-error {
    color: var(--dark-olive);
}

.btn-info {
    background: linear-gradient(135deg, var(--accent-yellow) 0%, var(--light-yellow) 100%);
    color: var(--dark-green);
}

.btn-warning {
    background: linear-gradient(135deg, var(--primary-yellow) 0%, var(--accent-yellow) 100%);
    color: var(--dark-green);
}

/* Alert styles */
.alert {
    padding: 16px 20px;
    margin-bottom: 24px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.alert-success {
    background: linear-gradient(135deg, var(--secondary-yellow) 0%, var(--olive-green) 100%);
    color: var(--white);
    border: 2px solid var(--secondary-yellow);
}

.alert-error {
    background: linear-gradient(135deg, var(--dark-olive) 0%, var(--dark-green) 100%);
    color: var(--light-yellow);
    border: 2px solid var(--dark-olive);
}

/* Enhanced Responsive Design for Client Interface */

/* Large screens (MacBook 13", Nest Hub Max, etc.) */
@media (max-width: 1440px) and (min-width: 1025px) {
    .data-table {
        table-layout: fixed;
    }

    .data-table th:first-child,
    .data-table td:first-child {
        width: 6%;
    }

    .data-table th:nth-child(2),
    .data-table td:nth-child(2) {
        width: 14%;
    }

    .data-table th:nth-child(3),
    .data-table td:nth-child(3) {
        width: 18%;
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .data-table th:nth-child(4),
    .data-table td:nth-child(4) {
        width: 12%;
    }

    .data-table th:nth-child(5),
    .data-table td:nth-child(5) {
        width: 10%;
    }

    .data-table th:nth-child(6),
    .data-table td:nth-child(6) {
        width: 10%;
    }

    .data-table th:nth-child(7),
    .data-table td:nth-child(7) {
        width: 12%;
    }

    .data-table th:nth-child(8),
    .data-table td:nth-child(8) {
        width: 8%;
    }

    .data-table th:last-child,
    .data-table td:last-child {
        width: 10%;
    }

    .data-table th,
    .data-table td {
        padding: 14px 12px;
        font-size: 13px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .btn-sm {
        padding: 6px 10px;
        font-size: 11px;
    }

    .btn-group {
        justify-content: center;
        gap: 3px;
    }
}

/* Tablet and smaller desktop screens */
@media (max-width: 1200px) {
    .admin-main {
        margin-left: 280px;
        max-width: calc(100vw - 292px);
    }
    
    .admin-content {
        padding: 24px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
    }
    
    .content-title {
        font-size: 22px;
    }
}

/* Small tablets */
@media (max-width: 992px) {
    .admin-sidebar {
        width: 260px;
    }
    
    .admin-main {
        margin-left: 272px;
        max-width: calc(100vw - 284px);
    }
    
    .admin-content {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 14px;
    }
    
    .stat-card {
        padding: 20px 16px;
    }
}

/* Mobile and Tablet */
@media (max-width: 768px) {
    .system-status {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .activity-item {
        padding: 14px;
        border-radius: 12px;
    }

    .activity-icon {
        font-size: 20px;
        width: 30px;
        margin-right: 10px;
    }
    
    /* Enhanced mobile layout fixes */
    .admin-main {
        margin-left: 0;
        max-width: 100vw;
        width: 100%;
    }
    
    .admin-content {
        padding: 16px 12px;
        border-radius: 0;
        margin: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .content-header {
        margin-bottom: 20px;
        padding: 16px 0;
    }
    
    .content-title {
        font-size: 20px;
        margin-bottom: 8px;
    }
    
    .content-subtitle {
        font-size: 14px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .stat-card {
        padding: 16px 12px;
    }
    
    .stat-number {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    /* Card layouts for mobile */
    .admin-card {
        margin-bottom: 16px;
        border-radius: 16px;
        overflow: hidden;
    }
    
    .card-header {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .card-title {
        font-size: 16px;
    }
    
    .card-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    /* Tables become card-style on mobile */
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Button improvements for mobile */
    .btn {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .btn-sm {
        min-height: 40px;
        padding: 10px 12px;
        font-size: 13px;
    }
    
    /* Form improvements */
    .filter-select,
    .search-input {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* Small mobile phones */
@media (max-width: 480px) {
    .admin-content {
        padding: 12px 8px;
    }
    
    .content-header {
        padding: 12px 0;
        margin-bottom: 16px;
    }
    
    .content-title {
        font-size: 18px;
    }
    
    .content-subtitle {
        font-size: 13px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 16px;
    }
    
    .stat-card {
        padding: 12px 8px;
        border-radius: 12px;
    }
    
    .stat-number {
        font-size: 18px;
        margin-bottom: 4px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .admin-card {
        margin-bottom: 12px;
        border-radius: 12px;
    }
    
    .card-header {
        padding: 12px;
    }
    
    .card-title {
        font-size: 15px;
    }
    
    /* Ultra-compact mobile layout */
    .btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .btn:last-child {
        margin-bottom: 0;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .admin-content {
        padding: 8px 6px;
    }
    
    .content-title {
        font-size: 16px;
    }
    
    .stat-card {
        padding: 10px 6px;
    }
    
    .stat-number {
        font-size: 16px;
    }
}
