@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #3b82f6;
    --accent-light: #60a5fa;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --white: #ffffff;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    color: var(--gray-900);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* =====================
   LOGIN PAGE
   ===================== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top, var(--accent) 0%, transparent 50%);
    opacity: 0.05;
    pointer-events: none;
}

.login-container {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 420px;
    text-align: center;
    border: 1px solid var(--gray-200);
    position: relative;
}

.main-logo {
    margin-bottom: 2rem;
}

.logo-symbol {
    width: 64px;
    height: 64px;
    background: var(--primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    position: relative;
}

.logo-symbol::after {
    content: 'BS';
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

.logo-subtitle {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tagline {
    color: var(--gray-600);
    margin-bottom: 2.5rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
}

.form-group {
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
    background: var(--white);
    color: var(--gray-900);
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.form-input::placeholder {
    color: var(--gray-400);
}

.login-btn {
    background: var(--primary);
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius);
    color: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.login-btn:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.test-accounts {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    text-align: left;
    border: 1px solid var(--gray-200);
}

.test-accounts small {
    color: var(--gray-600);
    line-height: 1.4;
    display: block;
    margin-bottom: 0.25rem;
}

.footer-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
    font-size: 0.75rem;
    color: var(--gray-500);
    line-height: 1.4;
}

/* =====================
   DASHBOARD
   ===================== */
.dashboard {
    display: none;
    min-height: 100vh;
    background: var(--gray-50);
}

.dashboard.active {
    display: block;
}

.dashboard-header {
    background: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-logo-symbol {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo-symbol::after {
    content: 'BS';
    color: var(--white);
    font-size: 1rem;
    font-weight: 700;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-badge {
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.875rem;
    border: 1px solid var(--gray-200);
}

.logout-btn {
    background: transparent;
    border: 1px solid var(--gray-200);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.875rem;
}

.logout-btn:hover {
    background: var(--gray-50);
    color: var(--gray-700);
}

.dashboard-content {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* =====================
   RECEPTION PANEL
   ===================== */
.reception-panel {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    text-align: center;
}

.panel-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.panel-subtitle {
    color: var(--gray-600);
    font-size: 1rem;
    margin-bottom: 2.5rem;
    line-height: 1.5;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.search-box {
    position: relative;
    margin-bottom: 2rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.search-input {
    width: 100%;
    padding: 1rem 1.25rem;
    padding-right: 120px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
    background: var(--white);
    text-align: center;
}

.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
    text-align: left;
}

.search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent);
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    color: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.875rem;
}

.search-btn:hover {
    background: var(--accent-light);
}

.search-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* =====================
   MANAGER PANEL
   ===================== */
.manager-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.quick-search,
.report-form {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1.5rem;
    letter-spacing: -0.25px;
}

.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.875rem;
    outline: none;
    transition: all 0.2s ease;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    background: var(--white);
}

.form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
    background: var(--white);
    color: var(--gray-900);
}

.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.submit-btn {
    background: var(--success);
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius);
    color: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 0.875rem;
    width: 100%;
    margin-top: 0.5rem;
}

.submit-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* =====================
   RESULT CARDS
   ===================== */
.result-card {
    display: none;
    margin-top: 2rem;
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    animation: slideUp 0.3s ease;
}

.result-card.show {
    display: block;
}

.result-card.danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: var(--gray-900);
}

.result-card.safe {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: var(--gray-900);
}

.result-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.status-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.danger .status-icon {
    background: #fee2e2;
    color: var(--danger);
}

.safe .status-icon {
    background: #dcfce7;
    color: var(--success);
}

.result-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
}

.result-subtitle {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
}

.result-details {
    display: grid;
    gap: 0.75rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.875rem;
}

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

.detail-label {
    font-weight: 500;
    color: var(--gray-600);
}

.detail-value {
    font-weight: 600;
    color: var(--gray-900);
    text-align: right;
    max-width: 60%;
    word-wrap: break-word;
}

.risk-high {
    color: var(--danger);
    font-weight: 600;
}

.risk-medium {
    color: var(--warning);
    font-weight: 600;
}

.risk-low {
    color: var(--success);
    font-weight: 600;
}

/* =====================
   ANIMATIONS
   ===================== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================
   RESPONSIVE DESIGN
   ===================== */
@media (max-width: 768px) {
    .login-container {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .dashboard-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .user-info {
        align-self: stretch;
        justify-content: space-between;
    }

    .manager-panel {
        grid-template-columns: 1fr;
    }

    .dashboard-content {
        padding: 1rem;
    }

    .reception-panel {
        padding: 2rem 1.5rem;
    }

    .search-box {
        max-width: none;
    }

    .detail-value {
        max-width: 50%;
    }
}

@media (max-width: 480px) {
    .search-input {
        padding-right: 100px;
    }

    .search-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .detail-value {
        max-width: 100%;
        text-align: left;
    }
}