/* Custom styles for PulsoPrest */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: rgba(37, 99, 235, 0.12);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --muted: #64748b;
    --border: rgba(148, 163, 184, 0.22);
    --surface: rgba(255, 255, 255, 0.88);
    --shadow-sm: 0 10px 30px rgba(15, 23, 42, 0.07);
    --shadow-md: 0 22px 55px rgba(15, 23, 42, 0.11);
    --shadow-glow: 0 20px 70px rgba(37, 99, 235, 0.18);
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --success-gradient: linear-gradient(135deg, #059669 0%, #22c55e 100%);
    --danger-gradient: linear-gradient(135deg, #f43f5e 0%, #fb7185 100%);
    --warning-gradient: linear-gradient(135deg, #f97316 0%, #facc15 100%);
    --dark-gradient: linear-gradient(135deg, #020617 0%, #111827 48%, #1e1b4b 100%);
    --font-family: 'Plus Jakarta Sans', sans-serif;
}

* {
    text-rendering: geometricPrecision;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: var(--font-family);
    letter-spacing: -0.015em;
    color: #172033;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 34rem),
        radial-gradient(circle at top right, rgba(124, 58, 237, 0.13), transparent 32rem),
        linear-gradient(180deg, #f8fbff 0%, #eef4ff 42%, #f8fafc 100%) !important;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.55), transparent 70%);
}

a {
    color: var(--primary);
}

a:hover {
    color: var(--primary-dark);
}

main > .container {
    max-width: 1320px;
}

.auth-main {
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 20%, rgba(37, 99, 235, 0.25), transparent 24rem),
        radial-gradient(circle at 82% 12%, rgba(124, 58, 237, 0.22), transparent 25rem),
        radial-gradient(circle at 50% 92%, rgba(16, 185, 129, 0.12), transparent 25rem),
        var(--dark-gradient);
}

.navbar {
    width: min(1320px, calc(100% - 28px));
    margin: 14px auto 0;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 24px;
    background: rgba(2, 6, 23, 0.82) !important;
    backdrop-filter: blur(22px);
    box-shadow: 0 24px 65px rgba(2, 6, 23, 0.24);
}

.navbar-brand {
    letter-spacing: -0.04em;
}

.navbar-brand i {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #facc15 !important;
    background: rgba(250, 204, 21, 0.12);
    box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.2);
}

.navbar .nav-link {
    margin: 0 2px;
    border-radius: 14px;
    color: rgba(255,255,255,0.76) !important;
    font-weight: 700;
    font-size: 0.91rem;
    padding: 0.72rem 0.9rem !important;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .show > .nav-link {
    color: #fff !important;
    background: rgba(255,255,255,0.09);
}

.navbar-toggler {
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 14px;
    padding: 0.65rem 0.8rem;
}

.session-pill {
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255,255,255,0.11);
    border-radius: 16px;
    background: rgba(255,255,255,0.07);
}

.dropdown-menu {
    padding: 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-md);
}

.dropdown-item {
    border-radius: 12px;
    color: #243044;
    font-weight: 650;
    padding: 0.72rem 0.85rem;
}

.dropdown-item:hover {
    color: var(--primary-dark);
    background: var(--primary-soft);
}

.card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.17);
    border-radius: 24px;
    background: var(--surface);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.card:hover {
    border-color: rgba(37, 99, 235, 0.16);
}

.card.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow);
}

.card-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.card-header.bg-dark {
    border-bottom: 0;
    background: linear-gradient(135deg, #101827 0%, #172554 100%) !important;
}

.bg-gradient-primary,
.bg-gradient-success,
.bg-gradient-danger,
.bg-gradient-warning {
    border: 0;
    color: #fff;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 48%, #7c3aed 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #047857 0%, #10b981 100%);
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #e11d48 0%, #fb7185 100%);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #ea580c 0%, #f59e0b 54%, #facc15 100%);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 48%, #6366f1 100%);
}

.bg-gradient-indigo {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 48%, #c026d3 100%);
}

.kpi-icon {
    position: absolute;
    right: 18px;
    bottom: -8px;
    font-size: 4.8rem;
    opacity: 0.18;
    transform: rotate(-8deg);
}

.table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    border-top: none;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    background: linear-gradient(180deg, #f8fafc 0%, #eef4ff 100%);
    color: #475569;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.075em;
    padding: 15px 18px;
}

.table tbody td {
    border-bottom-color: rgba(148, 163, 184, 0.14);
    padding: 16px 18px;
    vertical-align: middle;
}

.table-hover tbody tr {
    transition: background-color 0.14s ease;
}

.table-hover tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.045);
}

.table-responsive {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 20px;
    background: #fff;
}

.badge {
    font-weight: 800;
    letter-spacing: 0.02em;
}

.badge-status {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
}

.form-control,
.form-select {
    min-height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 14px;
    background-color: rgba(255,255,255,0.92);
    color: #172033;
    font-weight: 600;
    padding: 10px 14px;
}

.form-control::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(37, 99, 235, 0.58);
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.13);
}

.form-label {
    margin-bottom: 7px;
    color: #334155;
    font-weight: 800;
    font-size: 0.84rem;
}

.input-group-text {
    border-color: rgba(148, 163, 184, 0.34);
    border-radius: 14px;
    background: #f8fafc;
    color: #64748b;
}

.btn {
    border-radius: 14px;
    font-weight: 800;
    letter-spacing: -0.01em;
    padding: 10px 18px;
    transition: transform 0.17s ease, box-shadow 0.17s ease, background-color 0.17s ease, border-color 0.17s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    border-color: transparent;
    background: var(--primary-gradient);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.btn-primary:hover,
.btn-primary:focus {
    border-color: transparent;
    background: linear-gradient(135deg, #1d4ed8 0%, #6d28d9 100%);
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.28);
}

.btn-success {
    border-color: transparent;
    background: var(--success-gradient);
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.2);
}

.btn-warning {
    border-color: transparent;
    background: var(--warning-gradient);
    box-shadow: 0 12px 24px rgba(245, 158, 11, 0.2);
}

.btn-outline-secondary,
.btn-light {
    border-color: rgba(148, 163, 184, 0.26);
    background: rgba(255,255,255,0.82);
    color: #334155;
}

.btn-outline-light {
    border-color: rgba(255,255,255,0.2);
}

.btn-sm {
    border-radius: 12px;
    padding: 7px 13px;
    font-size: 0.8rem;
}

.alert {
    border: 0;
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.13), rgba(255,255,255,0.96));
    color: #065f46;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.13), rgba(255,255,255,0.96));
    color: #991b1b;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(255,255,255,0.96));
    color: #92400e;
}

.footer {
    border-top: 1px solid rgba(148, 163, 184, 0.18) !important;
    background: rgba(255,255,255,0.72) !important;
    backdrop-filter: blur(14px);
}

.login-card {
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.91);
    backdrop-filter: blur(24px);
    box-shadow: 0 30px 90px rgba(2, 6, 23, 0.34);
}

.brand-orb {
    display: inline-flex;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    color: #fff;
    background: var(--primary-gradient);
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.38);
}

.demo-box {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    background: linear-gradient(135deg, #f8fafc 0%, #eef4ff 100%);
}

.xsmall {
    font-size: 0.76rem;
}

.autocomplete-suggestions {
    z-index: 99;
    top: 100%;
    right: 0;
    left: 0;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-top: none;
    border-bottom-right-radius: 16px;
    border-bottom-left-radius: 16px;
    background-color: #fff;
    box-shadow: var(--shadow-sm);
}

.autocomplete-suggestion {
    padding: 12px;
    cursor: pointer;
}

.autocomplete-suggestion:hover {
    background-color: rgba(37, 99, 235, 0.08);
}

@media (max-width: 991.98px) {
    .navbar {
        border-radius: 20px;
    }

    .navbar-collapse {
        padding-top: 0.8rem;
    }
}

@media (max-width: 575.98px) {
    .navbar {
        width: calc(100% - 18px);
        margin-top: 9px;
    }

    .card {
        border-radius: 20px;
    }

    .table thead th,
    .table tbody td {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .table-responsive {
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
    }

    .cursor-pointer {
        cursor: pointer;
    }

    tr.cursor-pointer:hover {
        background-color: rgba(37, 99, 235, 0.04);
    }
}
