:root {
    --csp-primary: #1d8b7b;
    --csp-primary-dark: #0f5f57;
    --csp-primary-soft: #dff4f1;
    --csp-accent: #6fcbbd;
    --csp-surface: #f4fbfa;
    --csp-text: #183b37;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(180deg, #f8fffe 0%, #eef8f7 100%);
    color: var(--csp-text);
}

.navbar-white {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
}

.main-sidebar {
    background: linear-gradient(180deg, var(--csp-primary-dark) 0%, #134f49 100%) !important;
}

.brand-link {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-right: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.14);
}

.nav-sidebar .nav-link.active {
    background: linear-gradient(90deg, var(--csp-primary) 0%, #27a593 100%) !important;
    box-shadow: 0 10px 24px rgba(24, 98, 89, 0.22);
}

.content-wrapper {
    background: transparent;
}

.card {
    border: 0;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(19, 79, 73, 0.08);
}

.card-primary.card-outline {
    border-top: 3px solid var(--csp-primary);
}

.btn-primary,
.bg-primary {
    background-color: var(--csp-primary) !important;
    border-color: var(--csp-primary) !important;
}

.btn-primary:hover {
    background-color: var(--csp-primary-dark) !important;
    border-color: var(--csp-primary-dark) !important;
}

.btn-outline-primary {
    color: var(--csp-primary);
    border-color: var(--csp-primary);
}

.btn-outline-primary:hover {
    background: var(--csp-primary);
    border-color: var(--csp-primary);
}

.small-box {
    border-radius: 20px;
    overflow: hidden;
}

.small-box.bg-info,
.small-box.bg-success,
.small-box.bg-warning,
.small-box.bg-danger {
    color: #fff !important;
}

.small-box.bg-info {
    background: linear-gradient(135deg, #1d8b7b 0%, #30b3a0 100%) !important;
}

.small-box.bg-success {
    background: linear-gradient(135deg, #2a9d8f 0%, #63c8b7 100%) !important;
}

.small-box.bg-warning {
    background: linear-gradient(135deg, #55bda3 0%, #89dbc8 100%) !important;
}

.small-box.bg-danger {
    background: linear-gradient(135deg, #0f5f57 0%, #1d8b7b 100%) !important;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--csp-primary) 0%, #37b19f 100%);
    color: #fff;
    font-weight: 700;
}

.login-page {
    background:
        radial-gradient(circle at top left, rgba(111, 203, 189, 0.25), transparent 35%),
        linear-gradient(140deg, #f7fffe 0%, #e8f7f4 45%, #dcefeb 100%);
}

.login-box {
    width: 920px;
    max-width: calc(100% - 2rem);
}

.login-card-body,
.register-card-body {
    border-radius: 24px;
}

.login-brand-panel {
    background: linear-gradient(160deg, var(--csp-primary-dark) 0%, var(--csp-primary) 55%, #6fcbbd 100%);
    color: #fff;
    min-height: 100%;
}

.login-brand-panel .hero-icon {
    width: 78px;
    height: 78px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.metric-label {
    color: #7b9691;
    font-size: 0.9rem;
}

.table thead th {
    border-bottom: 0;
    color: var(--csp-primary-dark);
}

.badge-status {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.82rem;
}

.badge-status.pending {
    background: #e7f7f3;
    color: var(--csp-primary-dark);
}

.badge-status.done {
    background: #d7f1ec;
    color: #0d4d46;
}

.form-control:focus,
.custom-select:focus {
    border-color: #72cbbc;
    box-shadow: 0 0 0 0.2rem rgba(29, 139, 123, 0.18);
}

.hero-card {
    background: linear-gradient(135deg, #fafdfe 0%, #edf9f7 100%);
}

.prescription-sheet {
    background: #fff;
    border: 1px solid #d7ece8;
    border-radius: 22px;
    overflow: hidden;
}

.exam-sheet {
    background: #fff;
    border: 1px solid #d7ece8;
    border-radius: 22px;
    overflow: hidden;
}

.exam-header {
    background: linear-gradient(90deg, #ffffff 0%, #eef9f6 100%);
    border-bottom: 2px solid #8fd7ca;
}

.exam-box {
    border: 1px solid #d7ece8;
    border-radius: 14px;
    background: #fbfefe;
}

.seal-preview,
.signature-preview {
    max-width: 180px;
    max-height: 120px;
    object-fit: contain;
}

.prescription-header {
    background: linear-gradient(90deg, #ffffff 0%, #eef9f6 100%);
    border-bottom: 2px solid #8fd7ca;
}

.prescription-brand {
    color: var(--csp-primary-dark);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.prescription-watermark {
    color: rgba(29, 139, 123, 0.08);
    font-size: 4rem;
    line-height: 1;
    font-weight: 700;
}

.rx-line {
    border-bottom: 1px dashed #99cfc5;
    min-height: 42px;
}

@media print {
    .main-header,
    .main-sidebar,
    .main-footer,
    .content-header,
    .btn,
    .card-header,
    .no-print {
        display: none !important;
    }

    .content-wrapper,
    .content,
    .container-fluid,
    .card,
    .card-body {
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        background: #fff !important;
    }

    .prescription-sheet {
        border: 0 !important;
    }
}

@media (max-width: 768px) {
    .login-box {
        width: 100%;
    }
}
