@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&family=DM+Sans:wght@300;400;500&display=swap');

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

/* Root Container */
.crm-root {
    min-height: 100vh;
    display: flex;
    font-family: 'DM Sans', sans-serif;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    background: #0d1117;
}

/* Left Panel */
.left-panel {
    width: 46%;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.left-bg {
    position: absolute;
    inset: 0;
    background: url('/assets/image/auth/WEBD.png') center/cover no-repeat;
}

.left-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(10, 18, 35, 0.2) 0%, rgba(6, 14, 28, 0.2) 40%, rgba(4, 10, 22, 0.8) 100%);
}

.left-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 36px 32px;
    justify-content: space-between;
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 34px;
    height: 34px;
    background: #3b82f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-icon i {
    color: #fff;
    font-size: 17px;
}

.brand-name {
    font-family: 'Playfair Display', serif;
    font-size: 19px;
    font-weight: 600;
    color: #fff;
}

.brand-name span {
    color: #60a5fa;
}

/* Hero Text */
.hero-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px 0 16px;
}

.hero-text h1 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 600;
    color: #fff;
    line-height: 1.38;
    margin-bottom: 12px;
}

.hero-text h1 em {
    font-style: italic;
    color: #60a5fa;
}

.hero-text p {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.65;
    font-weight: 300;
    max-width: 250px;
}

/* Team Badge */
.team-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    background: rgba(255, 255, 255, 0.07);
    border: 0.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 40px;
    padding: 8px 14px 8px 8px;
    width: fit-content;
}

.avatars {
    display: flex;
}

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    margin-left: -8px;
    overflow: hidden;
    background: #1e3a5f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 500;
    color: #93c5fd;
}

.avatar:first-child {
    margin-left: 0;
}

.team-badge-text {
    font-size: 12px;
    color: #cbd5e1;
}

.team-badge-text strong {
    color: #fff;
    font-weight: 500;
    display: block;
    font-size: 12px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.06);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 14px;
    overflow: hidden;
    position: relative;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 2px 2px 0 0;
}

.stat-card.blue::before {
    background: #3b82f6;
}

.stat-card.green::before {
    background: #22c55e;
}

.stat-card.amber::before {
    background: #f59e0b;
}

.stat-card.purple::before {
    background: #a855f7;
}

.stat-icon {
    font-size: 15px;
    margin-bottom: 8px;
}

.stat-card.blue .stat-icon {
    color: #60a5fa;
}

.stat-card.green .stat-icon {
    color: #4ade80;
}

.stat-card.amber .stat-icon {
    color: #fbbf24;
}

.stat-card.purple .stat-icon {
    color: #c084fc;
}

.stat-num {
    font-size: 22px;
    font-weight: 500;
    color: #f1f5f9;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    margin-bottom: 3px;
}

.stat-label {
    font-size: 11px;
    color: #aebdce;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-trend {
    font-size: 11px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.stat-card.blue .stat-trend {
    color: #60a5fa;
}

.stat-card.green .stat-trend {
    color: #4ade80;
}

.stat-card.amber .stat-trend {
    color: #fbbf24;
}

.stat-card.purple .stat-trend {
    color: #c084fc;
}

/* Sparkline */
.sparkline {
    margin-top: 8px;
    height: 28px;
}

.sparkline svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Right Panel */
.right-panel {
    flex: 1;
    background: #ffffff;
    border-left: 10px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 36px;
}

.login-card {
    width: 100%;
    max-width: 340px;
}

/* Login Header */
.login-header {
    margin-bottom: 26px;
    text-align: center;
}

.login-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.login-header p {
    font-size: 13px;
    color: #64748b;
}

/* Form Groups */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #475569;
    margin-bottom: 6px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.input-wrap {
    position: relative;
}

.input-wrap i.prefix {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 15px;
    pointer-events: none;
    transition: color 0.2s;
}

.input-wrap:focus-within i.prefix {
    color: #3b82f6;
}

/* Input Fields */
.crm-input {
    width: 100%;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 11px 14px 11px 38px;
    font-size: 14px;
    color: #0f172a;
    font-family: 'DM Sans', sans-serif;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.crm-input::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.crm-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.crm-input.suffix-pad {
    padding-right: 40px;
}

/* Eye Button */
.eye-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    font-size: 15px;
    display: flex;
    align-items: center;
}

.eye-btn:hover {
    color: #334155;
}

.eye-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.eye-btn .d-none {
    display: none;
}

/* Options Row */
.options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    margin-top: 4px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 13px;
    color: #475569;
    user-select: none;
}

.remember input[type=checkbox] {
    width: 14px;
    height: 14px;
    accent-color: #3b82f6;
    cursor: pointer;
}

.forgot {
    font-size: 13px;
    color: #3b82f6;
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
}

.forgot:hover {
    color: #2563eb;
}

/* Login Button */
.btn-login {
    width: 100%;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 13px;
    font-size: 15px;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.18s, transform 0.12s;
}

.btn-login:hover {
    background: #2563eb;
}

.btn-login:active {
    transform: scale(0.98);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0;
}

.divider-line {
    flex: 1;
    height: 0.5px;
    background: #e2e8f0;
}

.divider span {
    font-size: 12px;
    color: #64748b;
}

/* SSO Row */
.sso-row {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.sso-btn {
    flex: 1;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
    color: #475569;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.sso-btn:hover {
    border-color: #94a3b8;
    color: #1e293b;
    background: #f8fafc;
}

.sso-btn i {
    font-size: 16px;
}

/* Signup Link */
.signup-link {
    text-align: center;
    font-size: 13px;
    color: #64748b;
    margin-top: 12px;
}

.signup-link a {
    color: #3b82f6;
    text-decoration: none;
    margin-left: 4px;
    cursor: pointer;
}

.signup-link a:hover {
    color: #2563eb;
}

/* Error Message */
.error-msg {
    font-size: 13px;
    font-weight: 500;
    color: #dc2626;
    margin-top: 6px;
    display: block;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.alert-error .alert-icon {
    color: #dc2626;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-error .alert-message {
    flex: 1;
}

.alert-close {
    flex-shrink: 0;
    border: 0;
    background: transparent;
    color: #991b1b;
    cursor: pointer;
    font-size: 22px;
    line-height: 18px;
    padding: 0;
}

.alert-close:hover,
.alert-close:focus {
    color: #dc2626;
}

/* Toast */
.toast {
    display: none;
    position: absolute;
    top: 14px;
    right: 14px;
    background: #22c55e;
    color: #fff;
    font-size: 13px;
    padding: 9px 16px;
    border-radius: 8px;
    z-index: 10;
    align-items: center;
    gap: 6px;
    animation: slideIn 0.3s ease;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
