:root {
    --sidebar-width: 220px;
    --sidebar-collapsed-width: 64px;
}

html.sidebar-pre-collapsed .sidebar { width: var(--sidebar-collapsed-width); }
html.sidebar-pre-collapsed .main-content { margin-left: var(--sidebar-collapsed-width); }

body {
    background-color: #f5f6f8;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: #1f2733;
    color: #fff;
    transition: width .2s ease;
    z-index: 1030;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar .brand {
    padding: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar .nav-link {
    color: #c7ccd4;
    padding: .65rem 1rem;
    white-space: nowrap;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,.08);
}

.sidebar.collapsed .label {
    display: none;
}

.sidebar-toggle-btn {
    background: transparent;
    border: none;
    color: #c7ccd4;
    padding: .75rem 1rem;
    text-align: left;
}

.main-content {
    margin-left: var(--sidebar-width);
    transition: margin-left .2s ease;
    min-height: 100vh;
    padding: 1.5rem;
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

.stat-card {
    background: #fff;
    border-radius: .5rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
}

/* DNS kayıt tipi rozetleri — kategorik atama, sabit sıra (bkz. dataviz skill).
   Tip her zaman rozet metninde görünür olduğu için düşük kontrastlı tonlar
   (aqua/yellow) relief kuralını karşılar. */
.badge-rtype-A      { background-color: #2a78d6; color: #fff; }
.badge-rtype-AAAA   { background-color: #1baf7a; color: #fff; }
.badge-rtype-CNAME  { background-color: #eda100; color: #1a1300; }
.badge-rtype-MX     { background-color: #008300; color: #fff; }
.badge-rtype-NS     { background-color: #4a3aa7; color: #fff; }
.badge-rtype-SRV    { background-color: #e34948; color: #fff; }
.badge-rtype-TXT    { background-color: #eb6834; color: #fff; }
.badge-rtype-SOA    { background-color: #898781; color: #fff; }

@media (prefers-color-scheme: dark) {
    .badge-rtype-A      { background-color: #3987e5; }
    .badge-rtype-AAAA   { background-color: #199e70; }
    .badge-rtype-CNAME  { background-color: #c98500; color: #1a1300; }
    .badge-rtype-MX     { background-color: #008300; }
    .badge-rtype-NS     { background-color: #9085e9; color: #0b0b0b; }
    .badge-rtype-SRV    { background-color: #e66767; }
    .badge-rtype-TXT    { background-color: #d95926; }
    .badge-rtype-SOA    { background-color: #898781; }
}

.sortable-th {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.sortable-th .sort-indicator {
    display: inline-block;
    width: 1em;
    opacity: .5;
}
.sortable-th.sort-active .sort-indicator {
    opacity: 1;
}

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 1px solid var(--bs-secondary-color, #6c757d);
    color: var(--bs-secondary-color, #6c757d);
    font-size: .68rem;
    line-height: 1;
    margin-left: 4px;
    cursor: help;
    user-select: none;
}

@media (max-width: 767.98px) {
    .sidebar {
        left: -100%;
        width: var(--sidebar-width);
    }
    .sidebar.mobile-open {
        left: 0;
    }
    .main-content {
        margin-left: 0;
    }
    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.5);
        z-index: 1020;
    }
    .sidebar-backdrop.show {
        display: block;
    }
}
