@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #6366f1;
    --secondary: #818cf8;
    --accent: #f72585;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #1e293b;
    --deep: #f0f2f7;
    --light: #f8fafc;
    --sidebar-bg: #1e293b;
    --glass-bg: #ffffff;
    --glass-border: #e2e8f0;
    --text-main: #1e293b;
    --text-light: #64748b;
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(99, 102, 241, 0.2);
    }

    50% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    }

    100% {
        box-shadow: 0 0 5px rgba(99, 102, 241, 0.2);
    }
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f0f2f7;
    color: #1e293b;
    display: flex;
    min-height: 100vh;
}

/* Mobile Header (Top Bar) */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #0f172a;
    /* Hardcoded dark for fallback */
    color: white;
    align-items: center;
    padding: 0 15px;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.btn-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    transition: background 0.2s;
    border-radius: 8px;
}

.btn-menu:active {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-header .brand {
    font-weight: 600;
    font-size: 1.2rem;
    margin-left: 15px;
    background: linear-gradient(45deg, #4361ee, #f72585);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100%;
    left: 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 10px 20px;
    background: rgba(0, 0, 0, 0.1);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: linear-gradient(45deg, #4361ee, #f72585);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-close {
    display: none;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.8rem;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.btn-close:hover {
    opacity: 1;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

/* Nav links */
.sidebar a {
    color: #a0a0a0;
    padding: 14px 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    font-weight: 500;
    border-left: 4px solid transparent;
    gap: 12px;
}

.sidebar a i {
    font-size: 1.2rem;
    opacity: 0.8;
}

.sidebar a:hover,
.sidebar a.active {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-left: 4px solid var(--primary);
}

/* Content Area */
.content {
    margin-left: 280px;
    padding: 40px;
    width: calc(100% - 280px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.content h1 {
    font-size: 2.2rem;
    margin-bottom: 30px;
    font-weight: 700;
    color: #1e293b;
}

/* Dashboard Cards (Stats) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #e8edf5;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.stat-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    opacity: 0.2;
    transform: scale(1.5);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12);
    background: #ffffff;
}

.stat-card h4 {
    color: #64748b;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    font-weight: 600;
}

.stat-card .value {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1e293b;
}

/* Tables & Card Boxes */
.card-box {
    background: #ffffff;
    border: 1px solid #e8edf5;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 20px;
    margin-bottom: 25px;
}

.card-box h3 {
    margin-bottom: 15px;
    color: #1e293b;
    font-size: 1.15rem;
    font-weight: 600;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

th {
    text-align: left;
    padding: 15px;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
}

td {
    background: #fff;
    padding: 15px;
    vertical-align: middle;
    border-top: 1px solid #f0f2f5;
    border-bottom: 1px solid #f0f2f5;
}

tr td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    border-left: 1px solid #f0f2f5;
}

tr td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    border-right: 1px solid #f0f2f5;
}

/* Badges */
.badge {
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-pending {
    background-color: #f59e0b;
}

.badge-downloaded {
    background-color: #3b82f6;
}

.badge-encoding {
    background-color: #8b5cf6;
}

.badge-site_upload {
    background-color: #6366f1;
}

.badge-completed {
    background-color: #10b981;
}

.badge-already_on_site {
    background-color: #64748b;
}

.badge-verification_pending {
    background-color: #f97316;
}

.badge-duplicate_pending {
    background-color: #ef4444;
}

.badge-rejected {
    background-color: #ef4444;
}

/* Forms & Inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    color: #1e293b;
    display: block;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    gap: 8px;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-success {
    background: var(--success);
    color: #fff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Overdue logic */
.overdue {
    color: var(--danger) !important;
    font-weight: 700 !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content {
    animation: fadeIn 0.5s ease-out;
}

/* Grid/Flex Utilities */
.responsive-grid {
    display: flex;
    gap: 20px;
}

/* Mobile responsiveness */
/* Upload Zone & Premium Components */
.upload-zone {
    border: 2px dashed rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    background: rgba(99, 102, 241, 0.03);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    margin-bottom: 20px;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

.upload-zone i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 15px;
    display: block;
}

.upload-zone p {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.upload-zone .file-name {
    display: block;
    margin-top: 10px;
    font-weight: 600;
    color: var(--success);
    font-size: 0.85rem;
}

.format-guide {
    background: #f8fafc;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

.format-guide h4 {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.format-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.format-tags span {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-main);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

@media (max-width: 1024px) {
    .sidebar {
        width: 260px;
    }

    .content {
        margin-left: 260px;
        width: calc(100% - 260px);
    }
}

@media (max-width: 768px) {
    .responsive-grid {
        flex-direction: column;
    }

    .form-row {
        flex-direction: column;
        gap: 10px !important;
    }

    .dashboard-main-grid {
        flex-direction: column !important;
    }

    .mobile-header {
        display: flex !important;
    }

    body.sidebar-active .mobile-header {
        display: none !important;
    }

    .btn-close {
        display: block !important;
    }

    .sidebar {
        left: -280px;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.4);
    }

    .sidebar.active {
        left: 0;
    }

    .content {
        margin-left: 0;
        width: 100%;
        padding: 20px;
        padding-top: 80px;
        /* Space for mobile header */
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .card-box {
        padding: 20px;
        overflow-x: auto;
    }

    table {
        min-width: 700px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .content h1 {
        font-size: 1.6rem;
    }

    .stat-card .value {
        font-size: 1.8rem;
    }
}

/* Profile Specific Styles */
.profile-container {
    max-width: 1000px;
    margin: 0 auto;
}

.profile-header-section {
    position: relative;
    background: linear-gradient(135deg, #e8eeff 0%, #f5e6ff 100%);
    border: 1px solid #e0e7ff;
    border-radius: 24px;
    padding: 15px 25px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1);
    overflow: hidden;
}

.profile-header-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    z-index: -1;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
    border: 4px solid rgba(255, 255, 255, 0.2);
}

.profile-info h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: #1e293b;
}

.profile-info p {
    color: #64748b;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-group {
    position: relative;
    margin-bottom: 15px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 38px;
    color: var(--text-light);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.input-group label {
    margin-left: 5px;
}

.input-group input {
    padding-left: 45px !important;
}

.input-group input:focus+i {
    color: var(--primary);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark);
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 600px) {
    .profile-header-section {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }

    .profile-info p {
        justify-content: center;
    }
}