﻿body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #020617;
    color: #e5e7eb;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: #020617;
    border-right: 1px solid #1e293b;
    padding: 16px;
    box-sizing: border-box;
}

.sidebar-header {
    margin-bottom: 12px;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
}

.sidebar-user {
    font-size: 13px;
    color: #9ca3af;
}

.nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav li {
    margin-bottom: 2px;
}

.nav a {
    display: block;
    padding: 10px 14px;
    border-radius: 10px;
    background-color: #020617;
    color: #e5e7eb;
    text-decoration: none;
    border: 1px solid transparent;
}

.nav a:hover {
    background-color: #0f172a;
    border-color: #1e293b;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 48px;
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    font-weight: 500;
}

.topbar-right a {
    color: #93c5fd;
    text-decoration: none;
    font-size: 14px;
}

.content-body {
    padding: 20px;
}

.panel {
    background-color: #020617;
    border-radius: 14px;
    border: 1px solid #1e293b;
    padding: 18px 20px;
}

.panel + .panel {
    margin-top: 16px;
}

.panel-title {
    font-weight: 600;
    margin-bottom: 12px;
}

.form-group {
    margin-bottom: 8px;
}

.form-control {
    width: 98%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #1e293b;
    background-color: #020617;
    color: #e5e7eb;
}

.form-control:focus {
    outline: none;
    border-color: #38bdf8;
}

.form-check-input {
    margin-right: 6px;
}

.btn {
    border: none;
    border-radius: 999px;
    padding: 8px 18px;
    cursor: pointer;
    font-weight: 500;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
}

.alert {
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
}

.alert-success {
    background-color: #166534;
    color: #bbf7d0;
}

.alert-danger {
    background-color: #7f1d1d;
    color: #fecaca;
}

.text-danger {
    color: #fecaca;
    font-size: 13px;
}

.hint-text {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
}

/* Logs */
.log-container {
    padding: 14px;
    border-radius: 14px;
    background-color: #020617;
    border: 1px dashed #1e293b;
}

.log-empty {
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px dashed #1e293b;
    font-size: 13px;
    color: #64748b;
}

.log-item {
    padding: 8px 12px;
    border-radius: 10px;
    margin-bottom: 8px;
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 14px;
}

.log-item:last-child {
    margin-bottom: 0;
}

.log-item.info {
    background-color: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.4);
    color: #bfdbfe;
}

.log-item.success {
    background-color: rgba(22,163,74,0.1);
    border: 1px solid rgba(34,197,94,0.4);
    color: #bbf7d0;
}

.log-item.error {
    background-color: rgba(185,28,28,0.15);
    border: 1px solid rgba(248,113,113,0.5);
    color: #fecaca;
}

.log-item.section {
    background-color: rgba(15,23,42,0.9);
    border: 1px solid rgba(148,163,184,0.5);
    color: #e2e8f0;
    font-weight: 600;
}

.log-icon {
    font-size: 15px;
}

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }

/* Login page */
.login-body {
    background-color: #020617;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-box {
    background-color: #020617;
    border-radius: 18px;
    border: 1px solid #1e293b;
    padding: 24px 22px;
    box-shadow: 0 20px 45px rgba(15,23,42,0.8);
}

.login-title {
    font-size: 20px;
    font-weight: 700;
}

.login-subtitle {
    font-size: 13px;
    color: #9ca3af;
    margin-top: 4px;
}

.w-100 {
    width: 100%;
}


.dns-log-card {
    background: #0a0f1a;
    border-left: 4px solid #2dd4ff;
    padding: 15px 18px;
    border-radius: 6px;
    box-shadow: 0 0 8px rgba(0,0,0,.4);
    margin-bottom: 10px;
}

.dns-log-header {
    font-weight: 600;
    font-size: 18px;
    color: #8be9fd;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.dns-log-icon {
    font-size: 22px;
    margin-right: 8px;
}

.dns-log-domain {
    color: #8be9fd;
}

.dns-log-body {
    padding-left: 8px;
}

.dns-log-line {
    margin: 4px 0;
    font-size: 15px;
}

.dns-success {
    color: #4ade80; /* xanh lá */
}

.dns-warning {
    color: #facc15; /* vàng */
}

.dns-error {
    color: #f87171; /* đỏ */
}
.nav-link.active {
    background: #0d6efd;
    border-radius: 6px;
    color: white !important;
    font-weight: 600;
}
/* Table Wrapper */
.cf-table-wrapper {
    background: #0f172a;
    border-radius: 10px;
    padding: 12px;
    border: 1px solid #1e293b;
}

/* Table Style */
.cf-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px; /* Hàng cách nhau nhẹ */
}

    .cf-table thead th {
        padding: 10px;
        color: #94a3b8;
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: .05em;
        border-bottom: 1px solid #1e293b;
        text-align:left;
    }

    .cf-table tbody tr {
        background: #020617;
        transition: .15s ease;
    }

        .cf-table tbody tr:hover {
            background: #030712;
            transform: translateY(-1px);
        }

    .cf-table td {
        padding: 10px 12px;
        vertical-align: middle;
    }

/* Domain Column */
.cf-domain {
    font-weight: 600;
    color: #f1f5f9;
}

/* Truncate long text */
.truncate {
    
    white-space: nowrap;
    overflow: hidden;
   
}

/* Badges */
.cf-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-green {
    background: rgba(34,197,94,.15);
    border: 1px solid rgba(34,197,94,.35);
    color: #86efac;
}

.badge-yellow {
    background: rgba(234,179,8,.15);
    border: 1px solid rgba(234,179,8,.35);
    color: #fef08a;
}

.badge-gray {
    background: rgba(148,163,184,.2);
    border: 1px solid rgba(148,163,184,.4);
    color: #cbd5e1;
}

.badge-dark {
    background: rgba(75,85,99,.3);
    border: 1px solid rgba(75,85,99,.6);
    color: #e2e8f0;
}

/* Monospace Values */
.cf-mono {
    font-family: Consolas, monospace;
    color: #cbd5e1;
}
/* Nameserver row */
.cf-ns-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
}

/* Provider badge */
.cf-ns-provider {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 16px;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
}

.cf-ns-cf {
    background: rgba(59,130,246,.15);
    border: 1px solid rgba(59,130,246,.5);
    color: #bfdbfe;
}

.cf-ns-other {
    background: rgba(148,163,184,.2);
    border: 1px solid rgba(148,163,184,.4);
    color: #e5e7eb;
}

/* Copy button */
.btn-copy {
    padding: 0;
    border: none;
    font-size: 0.8rem;
    text-decoration: none;
    color: #64748b;
}

    .btn-copy:hover {
        color: blue;
    }

.copy-icon {
    font-size: 12px;
}

/* Status badge thêm hiệu ứng loading khi refresh */
.cf-status-badge.refreshing {
    position: relative;
    opacity: .7;
}

    .cf-status-badge.refreshing::after {
        content: "";
        border: 2px solid rgba(148,163,184,.6);
        border-top-color: transparent;
        border-radius: 50%;
        width: 13px;
        height: 13px;
        position: absolute;
        right: -18px;
        top: 50%;
        transform: translateY(-50%);
        animation: spin 0.7s linear infinite;
    }

@keyframes spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}
.cf-ns-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ns-copy-btn {
   width: 70px;
}
.cf-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #020617;
    border-radius: 999px;
    padding: 6px 10px;
    border: 1px solid #1e293b;
    max-width: 540px;
}

.cf-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: #e5e7eb;
    font-size: 0.9rem;
}

    .cf-search-input::placeholder {
        color: #6b7280;
    }

    .cf-search-input:focus {
        outline: none;
        box-shadow: none;
    }

.cf-search-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cf-search-reset {
    padding-left: 4px;
    padding-right: 4px;
    color: #8b5cf6;
    text-decoration: none;
}

    .cf-search-reset:hover {
        text-decoration: underline;
    }

/* Pagination Cloudflare Manager */
.cf-pagination {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.cf-pagination-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none; /* bỏ dấu chấm */
    padding: 0;
    margin: 0;
}

.cf-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    padding: 4px 10px;
    border-radius: 999px; /* pill */
    font-size: 13px;
    text-decoration: none;
    border: 1px solid #374151;
    background: #0f172a; /* gần màu nền bảng */
    color: #e5e7eb;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

    .cf-page-link:hover {
        background: #1f2937;
        border-color: #4b5563;
        color: #f9fafb;
        transform: translateY(-1px);
    }

.cf-page-item.cf-active .cf-page-link {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    font-weight: 600;
}

.cf-page-item.cf-disabled .cf-page-link {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

/* 🔥 GRID LAYOUT */
.user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
    margin-top: 15px;
}

/* 🔥 CARD */
.user-card {
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 14px;
    padding: 18px;
    transition: 0.2s;
}

    .user-card:hover {
        border-color: #4f46e5;
        box-shadow: 0 0 8px #4f46e555;
    }

/* HEADER */
.user-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 55px;
    height: 55px;
    background: #4f46e5;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: white;
    font-size: 24px;
}

.user-info .user-name {
    font-size: 18px;
    font-weight: bold;
}

.user-username {
    font-size: 14px;
    color: #9ca3af;
}

/* BADGES */
.badge-success {
    background: #059669;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    color: white;
}

.badge-danger {
    background: #dc2626;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    color: white;
}

.badge-admin {
    background: #1d4ed8;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    color: white;
}

.badge-user {
    background: #6b7280;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    color: white;
}

/* FOOTER */
.user-footer {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.btn-blue {
    background: #3b82f6;
    color: white;
}

.btn-red {
    background: #ef4444;
    color: white;
}

/* RESET FORM */
.reset-form {
    max-width: 380px;
}

.form-row {
    margin-bottom: 12px;
}
.action-icons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.action-btn {
    border: none;
    background: transparent;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all .2s ease;
}

    /* Màu từng action */
    .action-btn.edit {
        color: #0d6efd;
    }

    .action-btn.default {
        color: #f0ad4e;
    }

    .action-btn.delete {
        color: #dc3545;
    }

    /* Hover effect */
    .action-btn:hover {
        background: rgba(255,255,255,0.08);
        transform: translateY(-1px);
    }
    /* STAR */
    .action-btn.default {
        color: #adb5bd; /* xám nhạt */
    }

        .action-btn.default:hover {
            color: #f0ad4e;
        }

        /* STAR ACTIVE (DEFAULT) */
        .action-btn.default.active {
            color: #f0ad4e; /* vàng */
            cursor: default;
        }

            .action-btn.default.active i {
                filter: drop-shadow(0 0 2px rgba(240,173,78,.6));
            }
/* container */
.action-icons {
    display: flex;
    justify-content: flex-end;
    align-items: center; /* ⭐ KEY FIX */
    gap: 10px;
}

/* form reset */
.action-form {
    margin: 0;
    display: flex;
    align-items: center;
}

/* button / link / span – cùng chuẩn */
.action-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1; /* ⭐ KEY FIX */
    cursor: pointer;
    transition: all .2s ease;
}

    /* ICON */
    .action-btn i {
        line-height: 1; /* ⭐ KEY FIX */
    }

    /* COLORS */
    .action-btn.edit {
        color: #0d6efd;
    }

    .action-btn.default {
        color: #adb5bd;
    }

        .action-btn.default:hover {
            color: #f0ad4e;
        }

        .action-btn.default.active {
            color: #f0ad4e;
            cursor: default;
        }

    .action-btn.delete {
        color: #dc3545;
    }

    /* HOVER */
    .action-btn:hover {
        background: rgba(255,255,255,0.08);
        transform: translateY(-1px);
    }
/* ===== Bootstrap Tooltip (extracted) ===== */
.tooltip {
    position: absolute;
    z-index: 1080;
    display: block;
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-style: normal;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    text-decoration: none;
    text-shadow: none;
    text-transform: none;
    letter-spacing: normal;
    word-break: normal;
    word-spacing: normal;
    white-space: normal;
    line-break: auto;
    font-size: .875rem;
    opacity: 0;
}

    .tooltip.show {
        opacity: .9;
    }

.tooltip-inner {
    max-width: 200px;
    padding: .25rem .5rem;
    color: #fff;
    text-align: center;
    background-color: #000;
    border-radius: .375rem;
}

.tooltip-arrow {
    position: absolute;
    display: block;
    width: .8rem;
    height: .4rem;
}

    .tooltip-arrow::before {
        position: absolute;
        content: "";
        border-color: transparent;
        border-style: solid;
    }

/* Placement: top */
.tooltip.bs-tooltip-top .tooltip-arrow {
    bottom: calc(-1 * .4rem);
}

    .tooltip.bs-tooltip-top .tooltip-arrow::before {
        top: 0;
        border-width: .4rem .4rem 0;
        border-top-color: #000;
    }

/* Placement: bottom */
.tooltip.bs-tooltip-bottom .tooltip-arrow {
    top: calc(-1 * .4rem);
}

    .tooltip.bs-tooltip-bottom .tooltip-arrow::before {
        bottom: 0;
        border-width: 0 .4rem .4rem;
        border-bottom-color: #000;
    }

/* Placement: left */
.tooltip.bs-tooltip-start .tooltip-arrow {
    right: calc(-1 * .4rem);
    width: .4rem;
    height: .8rem;
}

    .tooltip.bs-tooltip-start .tooltip-arrow::before {
        left: 0;
        border-width: .4rem 0 .4rem .4rem;
        border-left-color: #000;
    }

/* Placement: right */
.tooltip.bs-tooltip-end .tooltip-arrow {
    left: calc(-1 * .4rem);
    width: .4rem;
    height: .8rem;
}

    .tooltip.bs-tooltip-end .tooltip-arrow::before {
        right: 0;
        border-width: .4rem .4rem .4rem 0;
        border-right-color: #000;
    }
.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-input {
    background: #0b1220;
    border: 1px solid #1e293b;
    color: #e5e7eb;
    padding: 10px 14px;
    border-radius: 999px;
    width: 280px;
    outline: none;
}

.select-wrapper {
    position: relative;
}

.status-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #0b1220;
    border: 1px solid #1e293b;
    color: #e5e7eb;
    padding: 10px 38px 10px 16px;
    border-radius: 999px;
    cursor: pointer;
    min-width: 180px;
}

.select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #94a3b8;
}

.status-select:focus,
.search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,.25);
}

.btn-search {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border: none;
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 500;
}
/* ===== PAGE ===== */
.cf-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 60px;
    background: radial-gradient(ellipse at top, #0b1220, #020617);
}

/* ===== CARD ===== */
.cf-card {
    width: 100%;
    max-width: 640px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 20px 50px rgba(0,0,0,.5);
}

/* ===== TITLE ===== */
.cf-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #fff;
}

/* ===== FORM GROUP ===== */
.cf-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

    .cf-group label {
        font-size: 14px;
        margin-bottom: 6px;
        color: #cbd5f5;
    }

    .cf-group small {
        margin-top: 6px;
        font-size: 12px;
        color: #94a3b8;
    }

/* ===== INPUT ===== */
.cf-input {
    background: #020617;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 14px;
    color: #fff;
    outline: none;
    transition: all .2s ease;
}

    .cf-input::placeholder {
        color: #64748b;
    }

    .cf-input:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 0 2px rgba(59,130,246,.3);
    }

/* ===== ROW ===== */
.cf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ===== CHECKBOX ===== */
.cf-checkbox {
    justify-content: center;
}

    .cf-checkbox label {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 14px;
        cursor: pointer;
    }

/* ===== ACTIONS ===== */
.cf-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .btn-primary:hover {
        filter: brightness(1.1);
    }

.btn-secondary {
    color: #94a3b8;
    text-decoration: none;
    padding: 10px 14px;
}

    .btn-secondary:hover {
        color: #fff;
    }
.badge-user {
    background: rgba(59,130,246,.15);
    color: #93c5fd;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}
.form-group label {float: left; margin-bottom: 5px;}