:root {
    --bg-app: #f7f8fc;
    --sidebar-bg: #1b1830;
    --sidebar-bg-soft: #272446;
    --accent-lime: #d8ff5f;
    --accent-purple: #7b61ff;
    --success: #20a464;
    --warning: #ffc933;
    --danger: #ff4d5f;
    --text-main: #1f2433;
    --text-muted: #6b7280;
    --card-radius: 22px;
    --pill-radius: 999px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg-app);
    color: var(--text-main);
    font-family: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.btn-accent {
    background: var(--accent-lime);
    border-color: var(--accent-lime);
    color: #1f2a16;
    font-weight: 700;
}

.btn-accent:hover,
.btn-accent:focus,
.btn-accent:active {
    background: #c7ef4a !important;
    border-color: #c7ef4a !important;
    color: #1b2613 !important;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.auth-wrapper {
    padding: 1.2rem 0 0.8rem;
}

.auth-row {
    min-height: calc(100vh - 180px);
}

.auth-side {
    height: 100%;
    border-radius: 28px;
    padding: clamp(1.5rem, 3vw, 2.4rem);
    color: #f5f7ff;
    background: linear-gradient(165deg, #1b1830 0%, #242046 48%, #322d63 100%);
    box-shadow: 0 20px 44px rgba(22, 20, 40, 0.3);
    display: flex;
    flex-direction: column;
}

.auth-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: var(--pill-radius);
    padding: 0.42rem 0.78rem;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(216, 255, 95, 0.16);
    border: 1px solid rgba(216, 255, 95, 0.36);
    color: #f5ffcb;
    margin-bottom: 1rem;
}

.auth-title {
    margin: 0;
    font-size: clamp(1.6rem, 3.1vw, 2.35rem);
    line-height: 1.2;
    font-weight: 800;
}

.auth-subtitle {
    margin: 0.9rem 0 1.5rem;
    color: #c6ccea;
    max-width: 52ch;
}

.auth-features {
    display: grid;
    gap: 0.65rem;
    margin-top: auto;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 0.62rem;
    border-radius: 14px;
    padding: 0.68rem 0.82rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.auth-feature i {
    color: var(--accent-lime);
}

.auth-card {
    height: 100%;
    border-radius: 28px;
    padding: clamp(1.25rem, 2.3vw, 2rem);
}

.auth-card-header h2 {
    font-size: clamp(1.3rem, 2vw, 1.65rem);
    font-weight: 750;
}

.auth-form .form-label {
    font-weight: 600;
    color: #4b5563;
}

.input-group-modern .input-group-text,
.input-group-modern .form-control,
.input-group-modern .btn {
    border-radius: 14px;
    border-color: #e4e9f3;
    background: #f9fbff;
}

.input-group-modern .input-group-text {
    color: #7080a3;
}

.input-group-modern .form-control {
    background: #fff;
}

.input-group-modern .form-control:focus {
    box-shadow: none;
    border-color: #cfd7ec;
}

.input-group-modern .btn {
    border-left: 0;
    background: #fff;
}

.auth-footnote {
    color: #94a3b8;
    font-size: 0.84rem;
}

.app-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 252px;
    background: linear-gradient(180deg, #1b1830 0%, #151327 100%);
    color: #d1d5db;
    padding: 1.4rem 1rem;
    z-index: 1030;
    overflow-y: auto;
}

.sidebar-brand {
    margin-bottom: 1.4rem;
    padding: 0.45rem 0.35rem;
}

.sidebar-title {
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
}

.sidebar-subtitle {
    color: #a8b0cc;
    font-size: 0.82rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sidebar-link {
    border-radius: 14px;
    color: #c5cbe0;
    text-decoration: none;
    padding: 0.7rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 500;
    transition: 0.2s ease;
}

.sidebar-link:hover {
    background: rgba(216, 255, 95, 0.14);
    color: #f8fafc;
}

.sidebar-link.active {
    background: var(--accent-lime);
    color: #202423;
    font-weight: 700;
}

.sidebar-divider {
    border-color: rgba(148, 163, 184, 0.2);
}

.sidebar-tools-card {
    border-radius: 18px;
    border: 1px solid rgba(216, 255, 95, 0.2);
    background: linear-gradient(160deg, rgba(216, 255, 95, 0.15), rgba(123, 97, 255, 0.08));
    color: #f8fafc;
}

.sidebar-tools-card .btn {
    border-radius: var(--pill-radius);
}

.sidebar-logout {
    margin-top: auto;
    padding-top: 0.8rem;
}

.main-content {
    margin-left: 252px;
    min-height: 100vh;
}

.content-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 1.2rem 2rem;
}

.topbar {
    border-radius: 18px;
    background: #ffffff;
    border: 0;
    box-shadow: 0 8px 26px rgba(17, 24, 39, 0.06);
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
}

.topbar-title {
    font-weight: 700;
    font-size: 1.05rem;
}

.topbar-subtitle {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.topbar-search .form-control,
.topbar-search .input-group-text {
    border-radius: var(--pill-radius);
    border: 0;
    background: #f1f4fa;
}

.topbar-search .input-group-text {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    padding-left: 0.8rem;
}

.topbar-search .form-control {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.avatar-dot {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--accent-purple), #3f3a6c);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.soft-card {
    background: #fff;
    border: 0;
    border-radius: var(--card-radius);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.dashboard-card {
    background: #fff;
    border-radius: var(--card-radius);
    border: 0;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.stat-card {
    padding: 1rem;
    border-radius: var(--card-radius);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 750;
    line-height: 1.1;
}

.pill-badge,
.badge-pill {
    border-radius: var(--pill-radius);
    padding: 0.45rem 0.72rem;
    font-weight: 600;
    font-size: 0.76rem;
}

.action-btn,
.btn {
    border-radius: var(--pill-radius);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.table-card {
    border-radius: var(--card-radius);
    overflow: hidden;
}

.table-card .table {
    margin: 0;
}

.table-card thead th {
    border: 0;
    background: #f8f9fe;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.table-card tbody tr {
    border-top: 1px solid #eef1f7;
}

.table-card tbody tr:hover {
    background: #f8faff;
}

.table-sticky thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.project-avatar {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(130deg, var(--accent-purple), #5248b8);
    color: #fff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.55rem;
}

.project-meta {
    color: #94a3b8;
    font-size: 0.75rem;
}

.deleted-row {
    opacity: 0.68;
}

.filter-group .btn {
    font-size: 0.78rem;
}

#statusFilter,
#sslFilter {
    min-width: 150px;
}

.action-inline {
    display: inline-flex;
    gap: 0.35rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.kv-list .kv-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px dashed #e8ecf4;
}

.kv-list .kv-item:last-child {
    border-bottom: 0;
}

.kv-key {
    color: #667085;
    min-width: 110px;
}

.kv-val {
    text-align: right;
    word-break: break-word;
}

.copy-btn {
    border-radius: var(--pill-radius);
}

.detail-sticky {
    position: sticky;
    top: 1.5rem;
}

.terminal-box {
    border-radius: 18px;
    background: #0f1626;
    color: #b6d8be;
    min-height: 380px;
    padding: 1rem;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.1);
}

.terminal-box pre {
    margin: 0;
    color: #bad9c2;
    font-size: 0.88rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.empty-state {
    text-align: center;
    color: #7c879a;
    padding: 2.2rem 1rem;
}

.empty-state .bi {
    font-size: 2rem;
}

.assignment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.7rem;
    max-height: 360px;
    overflow: auto;
    padding-right: 0.2rem;
}

.assignment-check {
    display: flex;
    gap: 0.55rem;
    border: 1px solid #e9edf6;
    border-radius: 12px;
    padding: 0.55rem 0.65rem;
    background: #fbfcff;
}

.assignment-check .form-check-input {
    margin-top: 0.2rem;
}

.app-footer {
    color: #94a3b8;
    font-size: 0.9rem;
}

.mobile-bar {
    background: var(--sidebar-bg);
    color: #fff;
}

.offcanvas.offcanvas-start {
    background: var(--sidebar-bg);
    color: #fff;
    width: 252px;
}

.offcanvas .sidebar-link {
    color: #c5cbe0;
}

.offcanvas .sidebar-link.active {
    color: #202423;
}

@media (max-width: 991.98px) {
    .sidebar {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
    }

    .content-wrap {
        padding: 1rem 0.9rem 1.5rem;
    }

    .detail-sticky {
        position: static;
    }

    .auth-row {
        min-height: auto;
    }

    .auth-side {
        min-height: 260px;
    }
}
