﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --background: #f5f7fb;
    --sidebar: #111827;
    --sidebar-hover: #1f2937;
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #0891b2;
    --radius: 14px;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

button {
    cursor: pointer;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: var(--sidebar);
    color: white;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
    transition: .3s;
}

.logo-area {
    height: 80px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.logo {
    font-size: 22px;
    font-weight: 800;
}

    .logo span {
        color: #60a5fa;
    }

.menu {
    padding: 20px 12px;
}

.menu-title {
    font-size: 11px;
    color: #9ca3af;
    text-transform: uppercase;
    margin: 15px 12px 8px;
    letter-spacing: 1px;
}

.menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 4px;
    color: #d1d5db;
    transition: .2s;
}

    .menu a:hover,
    .menu a.active {
        background: var(--sidebar-hover);
        color: white;
    }

.menu-icon {
    width: 22px;
    text-align: center;
}

.main-content {
    margin-left: 250px;
    width: calc(100% - 250px);
}

.topbar {
    height: 80px;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}

.page-title h1 {
    font-size: 22px;
}

.page-title p {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

.user-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.content {
    padding: 30px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0,0,0,.03);
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: 20px;
}

.btn {
    border: none;
    border-radius: 9px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    transition: .2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

    .btn-primary:hover {
        background: var(--primary-dark);
    }

.btn-secondary {
    background: #eef2f7;
    color: #374151;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-sm {
    padding: 7px 10px;
    font-size: 12px;
}

.form-group {
    margin-bottom: 18px;
}

    .form-group label {
        display: block;
        margin-bottom: 7px;
        font-size: 13px;
        font-weight: 600;
    }

.form-control {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
    background: white;
    transition: .2s;
}

    .form-control:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(37,99,235,.1);
    }

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.badge {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.badge-new {
    background: #e5e7eb;
    color: #374151;
}

.badge-interested {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-follow {
    background: #fef3c7;
    color: #92400e;
}

.badge-positive {
    background: #dcfce7;
    color: #166534;
}

.badge-negative {
    background: #fee2e2;
    color: #991b1b;
}

.badge-sale {
    background: #ede9fe;
    color: #6d28d9;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    font-size: 12px;
    color: var(--muted);
    font-weight: 700;
    padding: 13px 15px;
    background: #f9fafb;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

tr:hover td {
    background: #fafcff;
}

.actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
}

    .search-box input {
        padding-left: 40px;
    }

.search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--muted);
}

    .empty-state .icon {
        font-size: 45px;
        margin-bottom: 15px;
    }

.toast-container {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 9999;
}

.toast {
    background: #111827;
    color: white;
    padding: 14px 18px;
    border-radius: 10px;
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
    animation: slideIn .3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    padding: 20px;
}

    .modal.show {
        display: flex;
    }

.modal-content {
    background: white;
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 16px;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
}

.modal-body {
    padding: 20px;
}

.close-modal {
    border: none;
    background: transparent;
    font-size: 24px;
}

.profile-header {
    display: flex;
    gap: 18px;
    align-items: center;
}

.profile-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #dbeafe;
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 25px;
    font-weight: 800;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.detail-item {
    background: #f9fafb;
    border-radius: 10px;
    padding: 14px;
}

.detail-label {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 5px;
}

.detail-value {
    font-size: 14px;
    font-weight: 600;
}

.timeline {
    position: relative;
    padding-left: 25px;
}

.timeline-item {
    border-left: 2px solid #dbeafe;
    padding: 0 0 25px 20px;
    position: relative;
}

    .timeline-item::before {
        content: "";
        position: absolute;
        left: -7px;
        top: 0;
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: var(--primary);
    }

.timeline-date {
    color: var(--muted);
    font-size: 11px;
}

.timeline-title {
    font-weight: 700;
    margin: 5px 0;
}

.timeline-note {
    color: #4b5563;
    font-size: 13px;
}

.alert {
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
}
