:root {
    --primary: #1f4fd6;
    --primary-dark: #173ca3;
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --sidebar: #0f172a;
    --sidebar-hover: #1e293b;
    --success: #15803d;
    --danger: #dc2626;
    --warning: #d97706;
    --info: #0284c7;
    --dark-badge: #374151;
    --purple: #7c3aed;
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    --radius: 18px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Arial, sans-serif;
    margin: 0;
}

a { text-decoration: none; }

.login-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #eef4ff 0%, #f8fbff 50%, #eef2ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 430px;
    background: var(--card);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 32px;
    border: 1px solid rgba(255,255,255,0.7);
}

.login-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin: 0 auto 16px;
}

.login-title {
    text-align: center;
    font-weight: 700;
    margin-bottom: 4px;
}

.login-subtitle {
    text-align: center;
    color: var(--muted);
    margin-bottom: 24px;
}

.form-control, .form-select {
    height: 46px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(31,79,214,0.12);
    border-color: var(--primary);
}

textarea.form-control {
    height: auto;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 12px;
    height: 46px;
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--sidebar);
    color: #fff;
    padding: 20px 16px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 1050;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 18px;
}

.brand-logo {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 22px;
}

.sidebar-brand h5 {
    margin: 0;
    font-weight: 700;
}

.sidebar-brand small {
    color: rgba(255,255,255,0.65);
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 8px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.88);
    padding: 12px 14px;
    border-radius: 14px;
    transition: 0.2s ease;
    font-weight: 500;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--sidebar-hover);
    color: #fff;
}

.disabled-link {
    opacity: 0.7;
    pointer-events: none;
}

.coming-soon {
    margin-left: auto;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 999px;
}

.main-content {
    margin-left: 260px;
    width: calc(100% - 260px);
    padding: 24px;
}

.topbar {
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-title {
    font-weight: 700;
}

.admin-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f3f6fb;
    border: 1px solid var(--border);
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 600;
}

.content-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    border: 1px solid rgba(255,255,255,0.8);
    margin-bottom: 24px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.dashboard-card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
    border-radius: 20px;
    padding: 22px;
    box-shadow: var(--shadow);
    border: 1px solid #eef2f7;
    height: 100%;
}

.dashboard-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 14px;
}

.icon-blue { background: rgba(37,99,235,0.12); color: #2563eb; }
.icon-green { background: rgba(22,163,74,0.12); color: #16a34a; }
.icon-orange { background: rgba(245,158,11,0.12); color: #f59e0b; }
.icon-red { background: rgba(239,68,68,0.12); color: #ef4444; }

.dashboard-card h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 6px;
}

.dashboard-card p {
    color: var(--muted);
    margin: 0;
}

.table-wrap {
    overflow-x: auto;
}

.table {
    vertical-align: middle;
}

.table thead th {
    white-space: nowrap;
    font-size: 13px;
    color: #475569;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}

.table td {
    white-space: nowrap;
}

.btn-soft {
    background: #eff4ff;
    color: var(--primary);
    border: 1px solid #dbe8ff;
    border-radius: 10px;
    padding: 8px 12px;
    font-weight: 600;
}

.btn-soft:hover {
    background: #dfeaff;
    color: var(--primary-dark);
}

.filter-row .form-control,
.filter-row .form-select {
    height: 42px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.status-assigned {
    background: rgba(100,116,139,0.14);
    color: #475569;
}

.status-contacted {
    background: rgba(2,132,199,0.14);
    color: #0369a1;
}

.status-understood {
    background: rgba(124,58,237,0.14);
    color: #6d28d9;
}

.status-quotation {
    background: rgba(217,119,6,0.14);
    color: #b45309;
}

.status-negotiation {
    background: rgba(55,65,81,0.14);
    color: #374151;
}

.status-confirmed {
    background: rgba(21,128,61,0.14);
    color: #15803d;
}

.status-lost {
    background: rgba(220,38,38,0.14);
    color: #b91c1c;
}

.status-default {
    background: rgba(107,114,128,0.14);
    color: #4b5563;
}

.form-section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
    color: #111827;
}

.required-star {
    color: #dc2626;
}

.empty-box {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        transition: 0.25s ease;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 16px;
    }

    .topbar {
        padding: 14px 16px;
    }
}

.info-pair {
    margin-bottom: 14px;
}

.info-pair .label {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.info-pair .value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    word-break: break-word;
}

.timeline {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline-item {
    position: relative;
    padding-left: 28px;
    padding-bottom: 20px;
    border-left: 2px solid #dbe4f0;
    margin-left: 10px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -8px;
    top: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid #fff;
    box-shadow: 0 0 0 3px rgba(31,79,214,0.12);
}

.timeline-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
}

.timeline-meta {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

.timeline-text {
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
}