/* ============================================
   TwentyFour IT — Customer Portal Styles
   ============================================ */

:root {
    --primary: #c6f400;
    --secondary: #a855f7;
    --cyan: #67e8f9;
    --purple: #a855f7;
    --amber: #fbbf24;
    --green: #22c55e;
    --red: #ef4444;

    --bg-dark: #0f0620;
    --bg-darker: #080312;
    --bg-card: #1a0a2e;
    --bg-hover: #2e0f49;
    --border: #3b1a58;

    --text-primary: #f1f5f9;
    --text-secondary: #c4b5d8;
    --text-muted: #8b7ba8;

    --gradient-1: linear-gradient(135deg, #c6f400 0%, #a855f7 50%, #67e8f9 100%);

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 30px rgba(198, 244, 0, 0.15);

    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --font-primary: 'Plus Jakarta Sans', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
}

[data-theme="light"] {
    --bg-dark: #f8f5ff;
    --bg-darker: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f0ebf8;
    --border: #e0d4f0;
    --text-primary: #1a0a2e;
    --text-secondary: #4a3b6b;
    --text-muted: #8b7ba8;
}

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

html { font-size: 16px; }

body {
    font-family: var(--font-primary);
    font-weight: 500;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }


/* ── Common Components ────────────────────── */
.logo-dots { display: flex; gap: 4px; align-items: center; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-lime { background: var(--primary); }
.dot-purple { background: var(--purple); }
.dot-white { background: #fff; }
.logo-text { color: #fff; font-weight: 800; }
.logo-accent { color: var(--primary); font-weight: 600; font-size: 0.9em; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: 10px;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 0.9rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #0f0620;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: #d8ff33;
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

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

.btn-sm { padding: 0.45rem 1rem; font-size: 0.82rem; }


/* ════════════════════════════════════════════
   LOGIN VIEW
   ════════════════════════════════════════════ */
.login-view {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.login-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--primary) 1px, transparent 1px),
        linear-gradient(90deg, var(--primary) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.03;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -150px;
    right: -100px;
    animation: orbFloat 8s ease-in-out infinite;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--purple);
    bottom: -100px;
    left: -100px;
    animation: orbFloat 10s ease-in-out infinite reverse;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--cyan);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: orbFloat 12s ease-in-out infinite;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(30px, -20px) scale(1.05); }
}

.login-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1000px;
    width: 100%;
    margin: 2rem;
    background: rgba(26, 10, 46, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}


/* ── Login Card ───────────────────────────── */
.login-card {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-header { margin-bottom: 2rem; }

.login-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.login-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
}

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

.login-form { display: flex; flex-direction: column; gap: 1.2rem; }

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }

.form-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.form-label i { font-size: 0.75rem; color: var(--primary); }

.form-input {
    width: 100%;
    padding: 0.85rem 1.2rem;
    background: rgba(15, 6, 32, 0.6);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    transition: all var(--transition);
}

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

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

.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.3rem;
    transition: color var(--transition);
}

.password-toggle:hover { color: var(--primary); }

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input { display: none; }

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    transition: all var(--transition);
    position: relative;
}

.checkbox-label input:checked + .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #0f0620;
    font-size: 0.7rem;
    font-weight: 800;
}

.forgot-link {
    color: var(--primary);
    font-weight: 600;
    transition: opacity var(--transition);
}

.forgot-link:hover { opacity: 0.8; }

.btn-login {
    width: 100%;
    justify-content: center;
    padding: 0.9rem;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.login-error {
    padding: 0.8rem 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    color: #ef4444;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

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

.login-footer a {
    color: var(--primary);
    font-weight: 600;
}

.login-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.8rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.7;
}

.login-security i { color: var(--green); }


/* ── Info Panel ───────────────────────────── */
.login-info-panel {
    background: linear-gradient(135deg, rgba(198, 244, 0, 0.05) 0%, rgba(168, 85, 247, 0.08) 100%);
    border-left: 1px solid var(--border);
    padding: 3rem;
    display: flex;
    align-items: center;
}

.info-content h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.info-content > p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.info-features { display: flex; flex-direction: column; gap: 1.5rem; }

.info-feature {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(198, 244, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
    font-size: 0.95rem;
}

.info-feature h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.info-feature p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}


/* ════════════════════════════════════════════
   DASHBOARD VIEW
   ════════════════════════════════════════════ */
.dashboard-view {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-darker);
}


/* ── Dashboard Header ─────────────────────── */
.dash-header {
    background: rgba(15, 6, 32, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.dash-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dash-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.15rem;
}

.dash-header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.dash-user-info {
    text-align: right;
}

.dash-user-name {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
}

.dash-user-company {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}


/* ── Dashboard Main ───────────────────────── */
.dash-main {
    flex: 1;
    padding: 2rem 0;
}

.dash-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}


/* ── Welcome Banner ───────────────────────── */
.dash-welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 2rem 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.dash-welcome::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-1);
}

.dash-welcome h1 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
}

.dash-welcome h1 span { color: var(--primary); }

.dash-welcome p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.dash-welcome-actions {
    display: flex;
    gap: 0.8rem;
    flex-shrink: 0;
}


/* ── Stat Cards ───────────────────────────── */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.dash-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all var(--transition);
}

.dash-stat-card:hover {
    border-color: rgba(198, 244, 0, 0.2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.dash-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.bg-lime { background: rgba(198, 244, 0, 0.12); color: var(--primary); }
.bg-purple { background: rgba(168, 85, 247, 0.12); color: var(--purple); }
.bg-cyan { background: rgba(103, 232, 249, 0.12); color: var(--cyan); }
.bg-amber { background: rgba(251, 191, 36, 0.12); color: var(--amber); }

.dash-stat-value {
    font-family: var(--font-code);
    font-size: 1.5rem;
    font-weight: 800;
    display: block;
}

.dash-stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}


/* ── Dashboard Cards ──────────────────────── */
.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.dash-card-wide { grid-column: 1 / -1; }

.dash-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.dash-card-header h2 {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dash-card-header h2 i {
    color: var(--primary);
    font-size: 0.9rem;
}

.dash-card-body { padding: 1.5rem; }


/* ── Filter Tabs ──────────────────────────── */
.dash-filter-tabs {
    display: flex;
    gap: 0.3rem;
    background: var(--bg-darker);
    border-radius: 8px;
    padding: 3px;
}

.filter-tab {
    padding: 0.35rem 0.9rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all var(--transition);
}

.filter-tab:hover { color: var(--text-primary); }

.filter-tab.active {
    background: var(--primary);
    color: #0f0620;
}


/* ── Licence Table ────────────────────────── */
.licence-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.licence-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.licence-table th {
    text-align: left;
    padding: 0.7rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.licence-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(59, 26, 88, 0.4);
    white-space: nowrap;
}

.licence-table tbody tr {
    transition: background var(--transition);
}

.licence-table tbody tr:hover {
    background: rgba(198, 244, 0, 0.03);
}

.licence-table tbody tr:last-child td {
    border-bottom: none;
}

.licence-product {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.licence-product-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.licence-product-name {
    font-weight: 700;
    color: var(--text-primary);
}

.licence-product-detail {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.7rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
}

.status-active {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.status-expiring {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
}

.status-expired {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}


/* ── Services List ────────────────────────── */
.services-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(15, 6, 32, 0.4);
    border: 1px solid rgba(59, 26, 88, 0.4);
    border-radius: 10px;
    transition: all var(--transition);
}

.service-item:hover {
    border-color: rgba(198, 244, 0, 0.15);
}

.service-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.service-info { flex: 1; }

.service-name {
    font-weight: 700;
    font-size: 0.88rem;
    margin-bottom: 0.1rem;
}

.service-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.service-status {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    flex-shrink: 0;
}


/* ── Account Details ──────────────────────── */
.account-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(59, 26, 88, 0.3);
}

.account-row:last-child { border-bottom: none; }

.account-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.account-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}


/* ── Dashboard Footer ─────────────────────── */
.dash-footer {
    background: var(--bg-dark);
    border-top: 1px solid var(--border);
    padding: 1.2rem 0;
}

.dash-footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.dash-footer-links {
    display: flex;
    gap: 1.5rem;
}

.dash-footer-links a {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: color var(--transition);
}

.dash-footer-links a:hover { color: var(--primary); }
.dash-footer-links a i { font-size: 0.7rem; }


/* ── Responsive ───────────────────────────── */
@media (max-width: 1024px) {
    .dash-stats { grid-template-columns: repeat(2, 1fr); }
    .dash-grid { grid-template-columns: 1fr; }
    .dash-card-wide { grid-column: auto; }
}

@media (max-width: 768px) {
    .login-container {
        grid-template-columns: 1fr;
        margin: 1rem;
    }

    .login-info-panel { display: none; }
    .login-card { padding: 2rem; }
    .login-title { font-size: 1.3rem; }

    .dash-header-inner { padding: 0.8rem 1rem; }
    .dash-container { padding: 0 1rem; }
    .dash-stats { grid-template-columns: 1fr 1fr; }

    .dash-welcome {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
        text-align: center;
    }

    .dash-welcome-actions { justify-content: center; }

    .dash-footer-inner {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }

    .dash-footer-links { flex-wrap: wrap; justify-content: center; gap: 1rem; }

    .dash-card-header { flex-direction: column; gap: 0.8rem; align-items: flex-start; }

    .dash-header-right { gap: 0.8rem; }
    .dash-user-info { display: none; }
    #logoutBtn span { display: none; }
}

@media (max-width: 480px) {
    .dash-stats { grid-template-columns: 1fr; }
    .dash-stat-card { padding: 1rem; }
    .dash-stat-value { font-size: 1.2rem; }
    .filter-tab { padding: 0.3rem 0.5rem; font-size: 0.7rem; }
}
