@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(252, 70, 107, 0.3), transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(99, 102, 241, 0.2), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent);
    border-radius: 50%;
}

.header h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.header p {
    opacity: 0.95;
    font-size: 15px;
    font-weight: 400;
}

.tabs {
    display: flex;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.04));
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    overflow-x: auto;
    padding: 8px 12px;
    gap: 8px;
}

.tab {
    padding: 12px 24px;
    cursor: pointer;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    position: relative;
}

.tab:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    transform: translateY(-1px);
}

.tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

.content {
    padding: 30px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.kpi-card {
    color: white;
    padding: 28px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent);
    border-radius: 50%;
    transition: all 0.4s;
}

.kpi-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.kpi-card:hover::before {
    transform: scale(1.2);
}

.kpi-card.green {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.kpi-card.orange {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.kpi-card.blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.kpi-card.pink {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.kpi-card.gold {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
}

.kpi-card.grey {
    background: linear-gradient(135deg, #606c88 0%, #3f4c6b 100%);
}

.kpi-card.yellow {
    background: linear-gradient(135deg, #ffe259 0%, #ffa751 100%);
}

.kpi-card.red {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

.kpi-label {
    font-size: 13px;
    opacity: 0.95;
    margin-bottom: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.kpi-value {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.kpi-progress {
    font-size: 13px;
    opacity: 0.95;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: white;
    transition: width 0.5s;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    overflow: hidden;
}

th {
    background: linear-gradient(to bottom, #f8f9fa, #f1f3f5);
    padding: 18px 20px;
    text-align: left;
    font-weight: 700;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
    font-size: 14px;
}

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

tr:hover {
    background: linear-gradient(to right, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    transform: scale(1.001);
    transition: all 0.2s;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 36px 0 24px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(to right, #667eea, #764ba2) 1;
    letter-spacing: -0.5px;
}

input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #667eea;
    border-radius: 6px;
    transition: all 0.2s;
}

input[type="checkbox"]:hover {
    transform: scale(1.1);
}

.action-link {
    color: #667eea;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.action-link:hover {
    color: #764ba2;
    border-bottom-color: #764ba2;
}

.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(8px);
    animation: fadeIn 0.3s;
}

.modal-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    margin: 5% auto;
    padding: 0;
    border-radius: 24px;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 28px 32px;
    border-radius: 24px 24px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.modal-body {
    padding: 32px;
    line-height: 1.7;
    color: #475569;
    font-size: 15px;
}

.modal-footer {
    padding: 20px 30px;
    background: #f8f9fa;
    border-radius: 0 0 10px 10px;
    display: flex;
    justify-content: flex-end;
}

.close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
}

.close-btn:hover {
    opacity: 0.7;
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 28px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.error-msg {
    color: #e53e3e;
    font-size: 14px;
    padding: 12px;
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

.hidden {
    display: none;
}

/* Header Buttons Sexy Style */
.header-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: white;
}

.header-btn-theme {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-btn-theme:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.header-btn-backoffice {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
    color: #1e293b;
    box-shadow: 0 4px 15px rgba(247, 151, 30, 0.3);
}

.header-btn-backoffice:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 30px rgba(247, 151, 30, 0.5);
}

.header-btn-logout {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.header-btn-logout:hover {
    background: rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.2);
}

/* Enhanced Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-screen::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 70%);
    top: -200px;
    right: -200px;
    border-radius: 50%;
    pointer-events: none;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 50px;
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
    width: 90%;
    max-width: 450px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-box h2 {
    text-align: center;
    color: #1e293b;
    margin-bottom: 35px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
}

.login-box input {
    width: 100%;
    padding: 14px 20px;
    margin-bottom: 20px;
    border: 2px solid #f1f5f9;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s;
    background: #f8fafc;
}

.login-box input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* Hub Styles */
.hub-container {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.hub-title {
    color: #1e293b;
    text-align: center;
    margin-bottom: 12px;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1px;
}

.hub-subtitle {
    color: #64748b;
    text-align: center;
    margin-bottom: 50px;
    font-size: 16px;
    font-weight: 500;
}

.soon-badge {
    font-size: 11px;
    background: #f1f5f9;
    color: #94a3b8;
    padding: 4px 12px;
    border-radius: 20px;
    margin-top: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid #e2e8f0;
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.hub-tile {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 35px 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    color: #1e293b !important;
    /* Dark text for contrast */
}

.hub-tile i,
.hub-tile .icon {
    font-size: 48px;
    margin-bottom: 5px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.hub-tile h3 {
    font-size: 20px;
    font-weight: 800;
    margin: 0;
    color: #1e293b !important;
}

.hub-tile p {
    font-size: 14px;
    opacity: 0.8;
    margin: 0;
    color: #64748b !important;
}

.hub-tile:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #667eea;
}

.hub-tile.premium {
    background: linear-gradient(to bottom right, #ffffff, #f8fafc);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.hub-tile.premium::after {
    content: '';
    position: absolute;
    top: -2px;
    bottom: -2px;
    left: -2px;
    right: -2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: -1;
    border-radius: 26px;
    opacity: 0.1;
    transition: opacity 0.3s;
}

.hub-tile.premium:hover::after {
    opacity: 0.3;
}

.hub-tile.soon {
    opacity: 0.6;
    background: #f1f5f9;
    cursor: not-allowed;
    border-style: dashed;
}

.hub-tile.soon:hover {
    transform: none;
    box-shadow: none;
}