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

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}
a {
    text-decoration: none;
    color: #3b82f6;
    transition: all 0.2s ease;
}
a:hover {
    color: #1d4ed8;
}
code {
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Courier New', Courier, monospace;
    color: #334155;
}

/* --- Layout Utilities --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-3 { margin-bottom: 1rem; }
.text-center { text-align: center; }
.text-muted { color: #64748b; font-size: 0.85em; }
.fw-bold { font-weight: 600; }
.w-100 { width: 100%; }

/* --- Cards / Panels (Mapping glass-panel to reference design cards) --- */
.glass-panel {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    overflow: hidden;
}

/* --- Navbar (Special override for header.glass-panel.navbar) --- */
.navbar.glass-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: none;
    border-radius: 8px;
    margin-top: 10px;
    margin-bottom: 40px;
}
.logo {
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
    text-decoration: none;
}
.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}
.nav-links a {
    color: rgba(255, 255, 255, 0.75) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-links a:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08);
}
.nav-links a.active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}
.nav-links a.logout {
    color: #fca5a5 !important;
}
.nav-links a.logout:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
}

/* --- Typography & Headings --- */
h1, h2, h3 {
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 20px;
}
p.subtitle {
    color: #64748b;
    margin-top: -15px;
    margin-bottom: 30px;
    font-size: 1.05rem;
}

/* --- Stats Grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.stat-card {
    padding: 24px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
}
.stat-title {
    color: #64748b;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}
.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: #0f172a;
}

/* --- Panel Body --- */
.panel-body {
    padding: 24px;
}

/* --- Split Layout --- */
.split-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}
@media (max-width: 992px) {
    .split-layout {
        grid-template-columns: 1fr;
    }
}

/* --- Tables --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}
th {
    text-align: left;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #64748b;
    padding: 1rem;
    border-bottom: 2px solid #edf2f7;
}
td {
    padding: 1rem;
    border-bottom: 1px solid #edf2f7;
    color: #475569;
    font-size: 0.95rem;
}
tr:last-child td {
    border-bottom: none;
}
tr:hover td {
    background-color: #f8fafc;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 4px;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    letter-spacing: 0.2px;
    user-select: none;
    white-space: nowrap;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.btn:active {
    transform: translateY(1px) scale(0.98);
}
.btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
    border-radius: 4px;
}
.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.15);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-1.5px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.btn-secondary {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    color: #475569;
    box-shadow: none;
}
.btn-secondary:hover {
    background: rgba(203, 213, 225, 0.15);
    border-color: #94a3b8;
    color: #334155;
    transform: translateY(-1px);
}
.btn-danger {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.15);
}
.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    transform: translateY(-1.5px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}
.btn-success {
    background: linear-gradient(135deg, #10b981, #047857);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.15);
}
.btn-success:hover {
    background: linear-gradient(135deg, #059669, #065f46);
    transform: translateY(-1.5px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

/* --- Forms --- */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #475569;
    font-size: 0.9rem;
}
.form-control {
    width: 100%;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #ffffff;
    color: #333;
}
.form-control:hover {
    border-color: #94a3b8;
}
.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
    background-color: #ffffff;
}

/* --- Badges & Alerts --- */
.badge {
    display: inline-block;
    padding: 0.3em 0.6em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: #e2e8f0;
    color: #475569;
}
.badge-plugin {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
    border: 1px solid #bae6fd;
}
.badge-theme {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
    border: 1px solid #a7f3d0;
}
.badge-active {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
    border: 1px solid #a7f3d0;
}
.badge-inactive {
    background-color: #f1f5f9 !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0;
}
.badge-suspended {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fecaca;
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: 0.95rem;
}
.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* --- Accordion / Domain Block --- */
.domain-block {
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.domain-block:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
.domain-header {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.domain-body {
    padding: 1.5rem;
    background: #fff;
}

/* --- Premium Modal --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.modal-content {
    background: #ffffff;
    border-radius: 8px;
    width: 100%;
    max-width: 550px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

/* --- Login Page specific styling --- */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}
.login-card {
    width: 100%;
    max-width: 420px;
    padding: 40px 32px;
}

/* --- Repo Checkbox Tags --- */
.repo-tag {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}
.repo-tag:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}
.repo-tag:has(.form-check-input:checked) {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
}
.action-buttons {
    display: flex;
    gap: 8px;
}
