/* ═══════════════════════════════════════════════════════════
   DARK PORTFOLIO THEME — Matching Screenshot Design
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Primary / Brand */
    --primary: #6b8afd;
    --primary-hover: #5a7af0;
    --primary-rgb: 107, 138, 253;

    /* Accent — golden/amber from screenshot */
    --accent: #c8a45a;
    --accent-rgb: 200, 164, 90;

    /* Secondary */
    --secondary: #ef4444;

    /* Backgrounds — Deep navy from screenshot */
    --bg-body: #0b1120;
    --bg-card: #111827;
    --bg-card-hover: #1a2332;
    --bg-input: #1a2332;

    /* Text */
    --text-main: #e2e8f0;
    --text-muted: #7a8ba3;
    --text-secondary: #4a5568;

    /* Sidebar */
    --sidebar-bg: #080e1a;
    --sidebar-text: #e2e8f0;
    --sidebar-hover: rgba(255, 255, 255, 0.06);
    --sidebar-active: rgba(107, 138, 253, 0.15);

    /* Borders */
    --border-color: #1e293b;
    --border-light: #1a2332;
    --card-border: #1e293b;
    --card-border-accent: rgba(200, 164, 90, 0.3);

    /* Utilities */
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #38bdf8;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.4);
    --radius: 12px;
    --hover-bg: rgba(255, 255, 255, 0.03);
    --table-header-bg: #0f1729;
    --table-row-hover: rgba(255, 255, 255, 0.03);
    --badge-opacity: 0.85;
    --input-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ═══════════════════════════════════════════════════════════
   LIGHT THEME
   ═══════════════════════════════════════════════════════════ */

[data-theme="light"] {
    /* Primary / Brand — slightly deeper for contrast on white */
    --primary: #5472e4;
    --primary-hover: #4562d4;
    --primary-rgb: 84, 114, 228;

    /* Accent */
    --accent: #b8942e;
    --accent-rgb: 184, 148, 46;

    /* Secondary */
    --secondary: #dc2626;

    /* Backgrounds */
    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-input: #f8fafc;

    /* Text */
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-secondary: #94a3b8;

    /* Sidebar */
    --sidebar-bg: #1e293b;
    --sidebar-text: #e2e8f0;
    --sidebar-hover: rgba(255, 255, 255, 0.08);
    --sidebar-active: rgba(84, 114, 228, 0.2);

    /* Borders */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --card-border: #e2e8f0;
    --card-border-accent: rgba(84, 114, 228, 0.25);

    /* Utilities */
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #0284c7;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.1);
    --hover-bg: rgba(0, 0, 0, 0.02);
    --table-header-bg: #f8fafc;
    --table-row-hover: rgba(0, 0, 0, 0.02);
    --badge-opacity: 1;
    --input-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Light‑mode status badges — darker text for readability */
[data-theme="light"] .status-new {
    background: rgba(22, 163, 74, 0.1);
    color: #15803d;
}

[data-theme="light"] .status-hot {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
}

[data-theme="light"] .status-medium {
    background: rgba(217, 119, 6, 0.1);
    color: #92400e;
}

[data-theme="light"] .status-cold {
    background: rgba(2, 132, 199, 0.1);
    color: #0369a1;
}

[data-theme="light"] .status-closed {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
}

[data-theme="light"] .status-lost {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
}

[data-theme="light"] .status-contacted {
    background: rgba(2, 132, 199, 0.1);
    color: #0369a1;
}

[data-theme="light"] .status-converted {
    background: rgba(22, 163, 74, 0.1);
    color: #15803d;
}

/* Light‑mode flash messages */
[data-theme="light"] .flash-error {
    background: rgba(220, 38, 38, 0.08);
    color: #b91c1c;
    border-color: rgba(220, 38, 38, 0.2);
}

[data-theme="light"] .flash-success {
    background: rgba(22, 163, 74, 0.08);
    color: #15803d;
    border-color: rgba(22, 163, 74, 0.2);
}

/* Light‑mode notification header */
[data-theme="light"] .notif-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

/* Light‑mode select chevron — darker fill */
[data-theme="light"] select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%235472e4' d='M7 10L2 5h10z'/%3E%3C/svg%3E") !important;
}

/* Light‑mode auth pages */
[data-theme="light"] .auth-container {
    background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
}

[data-theme="light"] .auth-container::before {
    background: radial-gradient(circle, rgba(84, 114, 228, 0.06) 0%, transparent 70%);
}

[data-theme="light"] .login-visual {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

[data-theme="light"] .login-form-side {
    background: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════ */

.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: fixed;
    height: 100%;
    transition: transform 0.3s ease;
    z-index: 1000;
    border-right: 1px solid var(--border-color);
}

.brand {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand span {
    color: var(--accent);
}

.brand-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 8px;
}

.nav-links {
    list-style: none;
    flex-grow: 1;
}

.nav-links li {
    margin-bottom: 4px;
}

.nav-links a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 14px;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: var(--sidebar-active);
    color: var(--primary);
}

.nav-links a.active {
    border-left: 3px solid var(--primary);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* ═══════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════ */

.main-content {
    margin-left: 260px;
    flex-grow: 1;
    padding: 30px;
    background: var(--bg-body);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-main);
}

/* ═══════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════ */

input[type="checkbox"] {
    accent-color: var(--primary);
}

/* ═══════════════════════════════════════════════════════════
   GLOBAL INPUT / SELECT / TEXTAREA — Consistent sizing everywhere
   ═══════════════════════════════════════════════════════════ */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="url"],
input[type="tel"],
input[type="search"],
select,
textarea {
    padding: 12px 16px !important;
    border: 1.5px solid var(--border-color) !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    background: var(--bg-input) !important;
    color: var(--text-main) !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    box-shadow: var(--input-shadow) !important;
    box-sizing: border-box;
    line-height: 1.5;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15) !important;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-secondary) !important;
    font-weight: 400;
    opacity: 0.8;
}

select {
    cursor: pointer;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%236b8afd' d='M7 10L2 5h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    padding-right: 42px !important;
}

textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════
   GLOBAL BUTTONS — Same color everywhere
   ═══════════════════════════════════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    letter-spacing: 0.3px;
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    gap: 6px;
    line-height: 1.5;
}

.btn-primary,
.btn.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #4a6cf7 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
    border: none !important;
}

.btn-primary:hover,
.btn.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%) !important;
    box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.4);
    transform: translateY(-2px);
}

.btn-primary:active,
.btn.btn-primary:active {
    transform: translateY(0);
}

.btn-danger,
.btn.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
    border: none !important;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    transform: translateY(-2px);
}

.btn-secondary,
.btn.btn-secondary {
    background: var(--bg-card) !important;
    color: var(--text-main) !important;
    border: 1.5px solid var(--border-color) !important;
}

.btn-secondary:hover,
.btn.btn-secondary:hover {
    background: var(--hover-bg) !important;
    border-color: var(--text-secondary) !important;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 14px !important;
    font-size: 12px !important;
}

.btn:not(.btn-primary):not(.btn-secondary):not(.btn-danger):hover {
    background: var(--hover-bg);
    transform: translateY(-1px);
}

.btn ion-icon {
    font-size: 18px;
}

.form-group {
    margin-bottom: 22px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.2px;
}

.form-group label::after {
    content: "";
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="url"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: var(--bg-input);
    transition: all 0.2s ease;
    outline: none;
    color: var(--text-main);
    box-shadow: var(--input-shadow);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: var(--bg-input);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
    font-weight: 400;
    opacity: 0.8;
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
    background: var(--hover-bg);
    cursor: not-allowed;
    opacity: 0.6;
}

.form-group textarea {
    resize: vertical;
    min-height: 110px;
    line-height: 1.6;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%236b8afd' d='M7 10L2 5h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 42px;
    background-color: var(--bg-input);
}

.form-group label span.required,
.form-group label:has(+ input[required])::after {
    content: " *";
    color: var(--danger);
    margin-left: 2px;
}

/* ═══════════════════════════════════════════════════════════
   AUTH PAGES (Login, Forgot Password)
   ═══════════════════════════════════════════════════════════ */

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0b1120 0%, #111827 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.auth-container::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(107, 138, 253, 0.08) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.auth-box {
    background: var(--bg-card);
    padding: 48px 42px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 0;
    font-size: 26px;
    font-weight: 700;
    color: var(--text-main);
}

.auth-box .brand-info {
    text-align: center;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.auth-box .brand-info ion-icon {
    font-size: 36px;
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
    padding: 12px;
    border-radius: 12px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-box .subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 32px;
    line-height: 1.6;
}

.input-group-modern {
    position: relative;
    margin-bottom: 20px;
}

.input-group-modern input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: var(--bg-input);
    color: var(--text-main);
}

.input-group-modern input:focus {
    border-color: var(--primary);
    background: var(--bg-body);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
    outline: none;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.input-group-modern input:focus+.input-icon {
    color: var(--primary);
}

.show-pass {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-secondary);
}

.auth-title {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary);
    font-size: 26px;
    font-weight: 700;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 14px;
}

.auth-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
}

.auth-link {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.auth-link-muted {
    color: var(--text-muted);
    font-weight: 500;
    text-decoration: none;
}

.auth-footer-text {
    margin-top: 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
}

.auth-footer-link {
    margin-top: 20px;
    text-align: center;
}

/* Login Two-Column */
.login-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.login-visual {
    flex: 1;
    background: linear-gradient(135deg, #0b1120 0%, #162038 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    color: white;
    padding: 40px;
}

.login-visual::before {
    content: "";
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(107, 138, 253, 0.08) 0%, transparent 60%);
    animation: rotateVisual 25s linear infinite;
}

@keyframes rotateVisual {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.visual-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

.visual-content ion-icon {
    font-size: 64px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.visual-content h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.visual-content p {
    font-size: 18px;
    opacity: 0.7;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

.login-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--bg-card);
}

.login-box-new {
    width: 100%;
    max-width: 420px;
}

.login-header {
    margin-bottom: 24px;
}

.login-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .login-wrapper {
        flex-direction: column;
    }

    .login-visual {
        padding: 40px 20px;
        min-height: 200px;
        flex: none;
    }

    .visual-content h1 {
        font-size: 32px;
    }

    .login-form-side {
        padding: 40px 20px;
    }
}

/* Flash Messages */
.flash-message {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.flash-message ion-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.flash-error {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1.5px solid rgba(239, 68, 68, 0.3);
}

.flash-success {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1.5px solid rgba(34, 197, 94, 0.3);
}

/* Form Actions */
.form-actions {
    margin-top: 28px;
}

.form-actions-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding-top: 28px;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

.tab-link {
    position: relative;
}

.tab-link:hover:not(.active) {
    color: var(--text-main) !important;
    background: var(--hover-bg);
    border-radius: 6px 6px 0 0;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1.5px solid var(--border-color);
    min-width: 120px;
    justify-content: center;
}

.btn-secondary:hover {
    background: var(--hover-bg);
    border-color: var(--text-secondary);
    color: var(--text-main);
}

.btn-secondary ion-icon {
    margin-right: 6px;
    font-size: 18px;
}

.btn-primary ion-icon {
    margin-right: 8px;
    font-size: 18px;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 24px;
}

.w-100 {
    width: 100%;
}

/* Form Sections */
.form-section {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.form-section-title::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.form-section-title ion-icon {
    font-size: 22px;
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
    padding: 10px;
    border-radius: 10px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.form-grid-full {
    grid-column: 1 / -1;
}

/* Compact Form */
.form-row-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-section-compact {
    margin-bottom: 0;
    padding: 0;
}

.form-section-title-compact {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(var(--primary-rgb), 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.form-section-title-compact ion-icon {
    font-size: 16px;
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
    padding: 6px;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.form-grid-compact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.form-grid-inline {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.form-group-compact {
    display: flex;
    flex-direction: column;
}

.form-group-compact label {
    font-weight: 600;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.form-group-compact input,
.form-group-compact select,
.form-group-compact textarea {
    padding: 8px 12px;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-main);
    background: var(--bg-input);
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.form-group-compact input:focus,
.form-group-compact select:focus,
.form-group-compact textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}

.form-group-compact input::placeholder {
    color: var(--text-secondary);
    font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════
   CARDS — Service Card Style (screenshot)
   ═══════════════════════════════════════════════════════════ */

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    padding: 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--card-border-accent), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--card-border-accent);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card form {
    margin: 0;
}

.stat-card h3 {
    color: var(--text-main);
    font-size: 16px;
    font-weight: 600;
}

.stat-card h4 {
    color: var(--text-main);
}

/* Icon Circle (screenshot style) */
.service-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
}

.service-icon ion-icon {
    font-size: 26px;
    color: var(--primary);
}

.service-description {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.service-title {
    color: var(--text-main);
    font-size: 16px;
    font-weight: 700;
}

/* Circular Progress */
.circular-progress-container {
    position: relative;
    width: 60px;
    height: 60px;
    margin-right: 15px;
}

.circular-progress-container svg {
    width: 60px;
    height: 60px;
    transform: rotate(-90deg);
}

.circular-progress-container circle {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
}

.progress-bg {
    stroke: var(--border-color);
}

.progress-bar {
    stroke: var(--primary);
    stroke-dasharray: 100;
    stroke-dashoffset: 25;
    transition: stroke-dashoffset 0.5s ease;
}

/* Widget Layouts */
.widget-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.widget-left {
    display: flex;
    align-items: center;
}

.widget-text {
    display: flex;
    flex-direction: column;
}

.widget-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
}

.widget-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* Status Badges */
.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-new,
.status-badge.status-new {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
}

.status-hot,
.status-badge.status-hot {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.status-medium,
.status-badge.status-medium {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
}

.status-cold,
.status-badge.status-cold {
    background: rgba(56, 189, 248, 0.15);
    color: #7dd3fc;
}

.status-closed,
.status-badge.status-closed {
    background: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
}

.status-lost,
.status-badge.status-lost {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
}

.status-contacted,
.status-badge.status-contacted {
    background: rgba(56, 189, 248, 0.15);
    color: #7dd3fc;
}

.status-converted,
.status-badge.status-converted {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
}

/* ═══════════════════════════════════════════════════════════
   PERFORMANCE DASHBOARD
   ═══════════════════════════════════════════════════════════ */

.performance-section {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--card-border);
    margin-bottom: 30px;
}

.performance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.performance-header h3 {
    color: var(--text-main);
}

.performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    text-align: center;
}

.perf-item input {
    width: 100%;
    margin-top: 5px;
    text-align: center;
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text-main);
}

.perf-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.perf-target {
    color: var(--danger);
    font-weight: 600;
    font-size: 11px;
}

/* ═══════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════ */

.table-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--card-border);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    background: var(--table-header-bg);
}

tbody tr {
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background: var(--table-row-hover) !important;
}

/* Buttons defined globally above — no duplicate needed here */

/* ═══════════════════════════════════════════════════════════
   NOTIFICATION DROPDOWN
   ═══════════════════════════════════════════════════════════ */

.notification-container {
    position: relative;
    display: inline-block;
}

.notification-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 40px;
    background: var(--bg-card);
    width: 300px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    z-index: 100;
    border: 1px solid var(--border-color);
}

.notification-dropdown.open {
    display: block;
}

.notif-header {
    background: linear-gradient(135deg, #0b1120 0%, #1a2332 100%);
    color: white;
    padding: 15px;
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notif-item {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-icon {
    width: 32px;
    height: 32px;
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-content h4 {
    font-size: 13px;
    margin-bottom: 3px;
    color: var(--text-main);
}

.notif-content p {
    font-size: 11px;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════
   CTA SECTION (Screenshot: "Let's Talk About The Next Big Thing")
   ═══════════════════════════════════════════════════════════ */

.cta-section {
    background: linear-gradient(135deg, #0f1729 0%, #162038 50%, #1a2845 100%);
    border-radius: var(--radius);
    padding: 60px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--card-border);
}

.cta-section::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--text-secondary), transparent);
}

.cta-subtitle {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: capitalize;
    margin-bottom: 16px;
}

.cta-title {
    font-size: 36px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    max-width: 500px;
}

.cta-button {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    text-decoration: none;
    text-align: center;
    line-height: 1.3;
}

.cta-button:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 30px rgba(var(--primary-rgb), 0.4);
}

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════ */

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#lead-form-container {
    animation: fadeIn 0.3s ease;
}

.stat-card {
    animation: fadeInUp 0.5s ease both;
}

.stat-card:nth-child(1) {
    animation-delay: 0.05s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.15s;
}

.stat-card:nth-child(4) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(5) {
    animation-delay: 0.25s;
}

.stat-card:nth-child(6) {
    animation-delay: 0.3s;
}

/* ═══════════════════════════════════════════════════════════
   INLINE STYLE OVERRIDES FOR DARK THEME
   ═══════════════════════════════════════════════════════════ */

[style*="background: white"],
[style*="background: #fff"],
[style*="background: #ffffff"] {
    background: var(--bg-card) !important;
}

[style*="border-bottom: 1px solid #f0f0f0"],
[style*="border-top: 1px solid #f0f0f0"],
[style*="border-bottom: 2px solid #f0f0f0"] {
    border-color: var(--border-color) !important;
}

[style*="background: #f8f9fa"],
[style*="background: #fafafa"] {
    background: var(--bg-body) !important;
}

[style*="border: 1px solid #ddd"],
[style*="border: 1.5px solid #e0e0e0"],
[style*="border: 1px solid #e0e0e0"],
[style*="border-bottom: 2px solid #e0e0e0"] {
    border-color: var(--border-color) !important;
}

[style*="color: #888"],
[style*="color: #888888"],
[style*="color: #aaa"],
[style*="color: #666"] {
    color: var(--text-muted) !important;
}

select[name="status"] {
    background-color: var(--bg-input) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-color) !important;
}

/* ═══════════════════════════════════════════════════════════
   THEME TOGGLE
   ═══════════════════════════════════════════════════════════ */

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 12px;
    width: 100%;
    font-family: inherit;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.theme-toggle ion-icon {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.theme-toggle:hover ion-icon {
    transform: rotate(30deg);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 992px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .table-container {
        overflow-x: auto;
    }

    table {
        min-width: 800px;
    }

    .form-row-split {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .form-grid-compact {
        grid-template-columns: 1fr;
    }

    .cta-section {
        flex-direction: column;
        text-align: center;
        padding: 40px 30px;
        gap: 30px;
    }

    .cta-title {
        font-size: 28px;
    }

    .auth-box {
        padding: 36px 28px;
        margin: 20px;
    }

    .stat-card {
        padding: 24px !important;
    }
}

/* Smooth Transitions */
body,
.sidebar,
.main-content,
.stat-card,
.table-container,
.performance-section,
.notification-dropdown {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}