/* ═══════════════════════════════════════════════════════════
   Relies Control Panel — UI
   Geïnspireerd op Hosting2GO: paars/wit, clean, professioneel
   ═══════════════════════════════════════════════════════════ */

:root {
    --primary:        #5c2d91;
    --primary-dark:   #4a2275;
    --primary-light:  #f3edfb;
    --accent:         #00c9b1;
    --accent-light:   #e6faf8;
    --bg:             #f4f6fb;
    --nav-bg:         #ffffff;
    --border:         #e2e8f0;
    --text:           #1a202c;
    --muted:          #64748b;
    --card-shadow:    0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
    --card-shadow-hover: 0 8px 24px rgba(92,45,145,.12);
    --radius:         10px;
    --radius-sm:      6px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: .9375rem;
    line-height: 1.6;
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* ══════════════════════════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════════════════════════ */
.panel-navbar {
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    min-height: 62px;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.panel-brand {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary) !important;
    letter-spacing: -.5px;
    text-decoration: none;
}

.panel-brand span {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .5px;
    vertical-align: middle;
    margin-left: 4px;
}

.panel-navbar .nav-link {
    color: #4a5568;
    font-weight: 500;
    padding: .45rem .85rem;
    border-radius: var(--radius-sm);
    transition: background .15s, color .15s;
    font-size: .9rem;
}

.panel-navbar .nav-link:hover,
.panel-navbar .nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
}

.panel-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════
   MAIN CONTENT
   ══════════════════════════════════════════════════════════ */
.panel-main {
    min-height: calc(100vh - 62px);
}

/* ══════════════════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════════════════ */
.panel-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
    transition: box-shadow .2s, transform .15s;
}

.panel-card:hover {
    box-shadow: var(--card-shadow-hover);
}

a .panel-card:hover {
    transform: translateY(-2px);
}

.panel-card .card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.icon-purple { background: rgba(92,45,145,.10); color: var(--primary); }
.icon-teal   { background: rgba(0,201,177,.12);  color: #00a896; }
.icon-blue   { background: rgba(59,130,246,.10); color: #3b82f6; }
.icon-orange { background: rgba(249,115,22,.10); color: #f97316; }
.icon-green  { background: rgba(34,197,94,.10);  color: #16a34a; }
.icon-red    { background: rgba(239,68,68,.10);  color: #dc2626; }
.icon-gray   { background: rgba(100,116,139,.10);color: #64748b; }
.icon-pink   { background: rgba(236,72,153,.10); color: #ec4899; }

.card-stat {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text);
}

.card-label {
    font-size: .82rem;
    color: var(--muted);
    margin-top: .25rem;
}

/* ══════════════════════════════════════════════════════════
   DOMAIN TABS
   ══════════════════════════════════════════════════════════ */
.domain-header {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.5rem;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    box-shadow: var(--card-shadow);
}

.domain-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}

.domain-tabs {
    background: #fff;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 0 1rem;
    margin-bottom: 1.75rem;
    overflow-x: auto;
    display: flex;
    flex-wrap: nowrap;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,.04);
}

.domain-tabs .nav-link {
    color: var(--muted);
    font-weight: 500;
    font-size: .875rem;
    padding: .7rem 1rem;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    border-radius: 0;
    transition: color .15s, border-color .15s;
    white-space: nowrap;
}

.domain-tabs .nav-link:hover {
    color: var(--primary);
    border-bottom-color: rgba(92,45,145,.3);
}

.domain-tabs .nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

/* ══════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════ */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    font-weight: 500;
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}
.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* ══════════════════════════════════════════════════════════
   TABLES
   ══════════════════════════════════════════════════════════ */
.panel-table {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.panel-table table { margin-bottom: 0; }

.panel-table thead th {
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    font-size: .775rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    padding: .7rem 1rem;
}

.panel-table tbody td {
    padding: .85rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    font-size: .9rem;
}

.panel-table tbody tr:last-child td { border-bottom: none; }
.panel-table tbody tr:hover td { background: #fafbff; }

/* ══════════════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════════════ */
.form-control, .form-select {
    border-color: #e2e8f0;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    transition: border-color .15s, box-shadow .15s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(92,45,145,.12);
}

.form-label {
    font-size: .82rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: .35rem;
}

.input-group-text {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: var(--muted);
    font-size: .875rem;
}

/* ══════════════════════════════════════════════════════════
   BADGES & STATUS
   ══════════════════════════════════════════════════════════ */
.badge-active    { background: #dcfce7; color: #166534; }
.badge-pending   { background: #fef9c3; color: #854d0e; }
.badge-suspended { background: #fee2e2; color: #991b1b; }

.badge-dns-A     { background: #dbeafe; color: #1d4ed8; }
.badge-dns-AAAA  { background: #ede9fe; color: #7c3aed; }
.badge-dns-CNAME { background: #fef3c7; color: #92400e; }
.badge-dns-MX    { background: #fce7f3; color: #9d174d; }
.badge-dns-TXT   { background: #e5e7eb; color: #374151; }
.badge-dns-SRV   { background: #d1fae5; color: #065f46; }
.badge-dns-NS    { background: #fee2e2; color: #991b1b; }
.badge-dns-CAA   { background: #f3f4f6; color: #4b5563; }

/* ══════════════════════════════════════════════════════════
   LOGIN PAGINA
   ══════════════════════════════════════════════════════════ */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3edfb 0%, #eef2ff 50%, #f0fdf4 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 2.5rem 2.25rem;
    box-shadow: 0 8px 40px rgba(92,45,145,.12);
}

.login-logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    text-align: center;
    margin-bottom: 1.75rem;
    letter-spacing: -.5px;
}

/* ══════════════════════════════════════════════════════════
   DASHBOARD STAT CARDS
   ══════════════════════════════════════════════════════════ */
.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--card-shadow);
    transition: box-shadow .2s;
}

.stat-card:hover { box-shadow: var(--card-shadow-hover); }

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: .82rem;
    color: var(--muted);
    margin-top: .2rem;
}

/* ══════════════════════════════════════════════════════════
   PAGE HEADER
   ══════════════════════════════════════════════════════════ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: .75rem;
}

.page-header h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--text);
}

/* ══════════════════════════════════════════════════════════
   SECTION TITLE
   ══════════════════════════════════════════════════════════ */
.section-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
}

/* ══════════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════════ */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: .75rem;
    display: block;
    opacity: .5;
}

.empty-state p { font-size: .9rem; }

/* ══════════════════════════════════════════════════════════
   ALERTS
   ══════════════════════════════════════════════════════════ */
.alert-success { background: #dcfce7; border-color: #bbf7d0; color: #166534; }
.alert-danger  { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
.alert-warning { background: #fef9c3; border-color: #fde047; color: #854d0e; }
.alert-info    { background: #dbeafe; border-color: #bfdbfe; color: #1e40af; }

/* ══════════════════════════════════════════════════════════
   TABS (sub-tabs binnen domein)
   ══════════════════════════════════════════════════════════ */
.nav-tabs {
    border-bottom: 1px solid var(--border);
}
.nav-tabs .nav-link {
    color: var(--muted);
    font-size: .875rem;
    font-weight: 500;
    border-radius: 0;
    border: none;
    border-bottom: 2px solid transparent;
    padding: .6rem 1rem;
    margin-bottom: -1px;
}
.nav-tabs .nav-link:hover { color: var(--primary); background: transparent; }
.nav-tabs .nav-link.active {
    color: var(--primary);
    font-weight: 600;
    border-bottom-color: var(--primary);
    background: transparent;
}

/* ══════════════════════════════════════════════════════════
   PROGRESS BAR
   ══════════════════════════════════════════════════════════ */
.progress { background: #f1f5f9; border-radius: 99px; }

/* ══════════════════════════════════════════════════════════
   LOG OUTPUT
   ══════════════════════════════════════════════════════════ */
#logOutput {
    font-size: .78rem;
    line-height: 1.7;
    font-family: 'SFMono-Regular', Consolas, monospace;
}

/* ══════════════════════════════════════════════════════════
   TOTP INPUT
   ══════════════════════════════════════════════════════════ */
input[name="totp_code"] {
    letter-spacing: .5em;
    font-size: 1.5rem;
    text-align: center;
}

/* ══════════════════════════════════════════════════════════
   BREADCRUMB
   ══════════════════════════════════════════════════════════ */
.breadcrumb {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .5rem 1rem;
    font-size: .85rem;
    margin-bottom: 0;
}
.breadcrumb-item + .breadcrumb-item::before { color: var(--muted); }

/* ══════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════ */
.modal-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
}
.modal-content { border-radius: var(--radius); border-color: var(--border); }

/* ══════════════════════════════════════════════════════════
   DROPDOWN
   ══════════════════════════════════════════════════════════ */
.dropdown-menu {
    border-color: var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,.10);
    font-size: .9rem;
}
.dropdown-item:hover, .dropdown-item:focus {
    background: var(--primary-light);
    color: var(--primary);
}

/* ══════════════════════════════════════════════════════════
   PROVISIONING STATUS INDICATOR
   ══════════════════════════════════════════════════════════ */
.provision-status {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .78rem;
    font-weight: 600;
    padding: .2rem .6rem;
    border-radius: 99px;
}
.provision-ok      { background: #dcfce7; color: #166534; }
.provision-pending { background: #fef9c3; color: #854d0e; }
.provision-failed  { background: #fee2e2; color: #991b1b; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .panel-main > .container-fluid { padding: .75rem !important; }
    .domain-header { padding: .9rem 1rem; }
    .panel-card { padding: 1.1rem; }
    .stat-card { padding: 1rem; }
    .stat-card .stat-value { font-size: 1.4rem; }
}
