/* ========== Theme NRO - Tím / Magenta ========== */
body.theme-nro {
    min-height: 100vh;
    background: linear-gradient(180deg, #1a0a2e 0%, #2d0f3d 25%, #4a1560 50%, #6b1d5c 75%, #8b2d6b 100%);
    background-attachment: fixed;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    position: relative;
}

body.theme-nro::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3Cpattern id='grid' width='10' height='10' patternUnits='userSpaceOnUse'%3E%3Cpath d='M 10 0 L 0 0 0 10' fill='none' stroke='rgba(255,255,255,0.06)' stroke-width='0.5'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100' height='100' fill='url(%23grid)'/%3E%3Ccircle cx='20' cy='30' r='0.5' fill='rgba(255,255,255,0.15)'/%3E%3Ccircle cx='80' cy='20' r='0.5' fill='rgba(255,255,255,0.15)'/%3E%3Ccircle cx='40' cy='70' r='0.5' fill='rgba(255,255,255,0.12)'/%3E%3Ccircle cx='90' cy='80' r='0.5' fill='rgba(255,255,255,0.12)'/%3E%3C/svg%3E");
    opacity: 0.8;
    z-index: 0;
    pointer-events: none;
}

body.theme-nro .container,
body.theme-nro .main {
    position: relative;
    z-index: 2;
}

/* ---------- Hiệu ứng crystal (điểm + đường nối) ---------- */
.crystals-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.crystal-dot {
    position: absolute;
    left: 0;
    top: 0;
    border-radius: 50%;

    /* Gradient sâu hơn để scale nhìn mịn */
    background: radial-gradient(
        circle at 30% 30%,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 200, 255, 0.85) 25%,
        rgba(255, 150, 255, 0.45) 55%,
        rgba(255, 100, 255, 0.15) 100%
    );

    box-shadow:
        0 0 4px rgba(255, 200, 255, 0.6),
        0 0 8px rgba(255, 150, 255, 0.35);

    will-change: transform, opacity;
    contain: layout style paint;
    backface-visibility: hidden; /* tránh flicker khi scale */
}

.crystal-line {
    position: absolute;
    left: 0;
    top: 0;
    height: 1px;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 220, 255, 0.6),
        rgba(255, 150, 255, 0.5),
        transparent
    );

    transform-origin: 0 0;

    box-shadow: 0 0 4px rgba(255, 180, 255, 0.35);

    will-change: transform, opacity;
    contain: layout style paint;
    backface-visibility: hidden;
}


/* ---------- Cards ---------- */
body.theme-nro .card {
    background: rgba(26, 10, 46, 0.88);
    border: 1px solid rgba(255, 200, 255, 0.25);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 200, 255, 0.1);
    color: #fff;
}

body.theme-nro .card-body {
    color: #fff;
}

body.theme-nro .card-title,
body.theme-nro .card-text,
body.theme-nro .card .h5,
body.theme-nro .card .h6 {
    color: #fff;
}

body.theme-nro .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

body.theme-nro .text-dark {
    color: #fff !important;
}

body.theme-nro .text-warning {
    color: #ffe066 !important;
}

/* ---------- Logo ---------- */
body.theme-nro .card a.text-dark {
    color: #fff !important;
}

body.theme-nro .card a.text-dark:hover {
    color: rgba(255, 255, 255, 0.9) !important;
}

body.theme-nro .card h1.mb-0 {
    color: #fff;
    font-weight: 700;
    text-shadow: 0 0 20px rgba(180, 255, 100, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ---------- Nav pills ---------- */
body.theme-nro .nav-pills .nav-link {
    background: rgba(107, 29, 92, 0.8);
    color: #fff;
    border-radius: 8px;
    border: 1px solid rgba(255, 200, 255, 0.2);
    font-weight: 500;
}

body.theme-nro .nav-pills .nav-link:hover {
    background: rgba(139, 45, 107, 0.9);
    color: #fff;
    border-color: rgba(255, 200, 255, 0.35);
}

body.theme-nro .nav-pills .nav-link.active {
    background: linear-gradient(90deg, #6b1d5c, #8b2d6b);
    color: #fff;
    border-color: rgba(255, 200, 255, 0.4);
    box-shadow: 0 2px 10px rgba(139, 45, 107, 0.5);
}

/* ---------- Buttons outline ---------- */
body.theme-nro .btn-outline-primary {
    background: transparent;
    border: 1px solid rgba(255, 200, 255, 0.5);
    color: #fff;
    border-radius: 8px;
}

body.theme-nro .btn-outline-primary:hover {
    background: rgba(139, 45, 107, 0.6);
    border-color: rgba(255, 200, 255, 0.6);
    color: #fff;
}

body.theme-nro .btn-outline-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
}

body.theme-nro .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

body.theme-nro .btn-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}

body.theme-nro .btn-link:hover {
    color: #fff;
}

/* ---------- Form (inputs trong card) ---------- */
body.theme-nro .card .form-control,
body.theme-nro .card .form-select {
    background: #e8e8e8;
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #2d2d2d;
    border-radius: 8px;
}

body.theme-nro .card .form-control::placeholder {
    color: #666;
}

body.theme-nro .card .form-control:focus,
body.theme-nro .card .form-select:focus {
    background: #fff;
    border-color: rgba(139, 45, 107, 0.5);
    box-shadow: 0 0 0 3px rgba(139, 45, 107, 0.2);
}

body.theme-nro .card .form-label {
    color: rgba(255, 255, 255, 0.95);
}

/* ---------- Table ---------- */
body.theme-nro .card .table {
    color: #fff;
}

body.theme-nro .card .table thead th {
    color: #fff;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 200, 255, 0.3);
    background: transparent;
}

body.theme-nro .card .table tbody td,
body.theme-nro .card .table tbody th {
    color: #fff;
    border-color: rgba(255, 200, 255, 0.12);
    background: transparent;
}

body.theme-nro .card .table-striped tbody tr:nth-of-type(odd) {
    background: rgba(255, 255, 255, 0.03);
}

body.theme-nro .card .table-hover tbody tr:hover {
    background: rgba(255, 200, 255, 0.08);
}

/* ---------- Nội dung trang (ngoài card: home, tiêu đề) ---------- */
body.theme-nro #main-content {
    color: #fff;
    background: rgba(26, 10, 46, 0.85);
    border: 1px solid rgba(255, 200, 255, 0.22);
    border-radius: 12px;
    padding: 1rem 1rem 1.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 200, 255, 0.08);
}

@media (min-width: 576px) {
    body.theme-nro #main-content {
        padding: 1.25rem 1.5rem 2rem;
    }
}

@media (min-width: 768px) {
    body.theme-nro #main-content {
        padding: 1.5rem 2rem 2.5rem;
    }
}

body.theme-nro #main-content > .card {
    background: rgba(26, 10, 46, 0.88);
    border: 1px solid rgba(255, 200, 255, 0.25);
}

body.theme-nro #main-content h1,
body.theme-nro #main-content h2,
body.theme-nro #main-content h5,
body.theme-nro #main-content h6,
body.theme-nro #main-content p {
    color: #fff;
}

body.theme-nro #main-content hr {
    border-color: rgba(255, 200, 255, 0.2);
}

/* ---------- Badge trạng thái ---------- */
body.theme-nro .badge.bg-success {
    background: rgba(13, 110, 253, 0.9) !important;
    color: #fff;
}

body.theme-nro .badge.bg-warning {
    color: #1a0a2e;
}

/* ---------- Modal: không dùng backdrop Bootstrap, dùng overlay CSS (tránh backdrop chặn click) ---------- */
.modal.show::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}
.modal-backdrop {
    display: none !important;
}
.modal {
    z-index: 1050;
}
body.theme-nro .modal-content {
    background: rgba(26, 10, 46, 0.96);
    border: 1px solid rgba(255, 200, 255, 0.3);
    border-radius: 12px;
    color: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

body.theme-nro .modal-header {
    border-bottom-color: rgba(255, 200, 255, 0.2);
}

body.theme-nro .modal-footer {
    border-top-color: rgba(255, 200, 255, 0.2);
}

body.theme-nro .modal-title {
    color: #fff;
}

body.theme-nro .modal-body .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

body.theme-nro .modal .btn-close {
    filter: invert(1);
}

body.theme-nro .modal .btn-secondary {
    background: rgba(107, 29, 92, 0.8);
    border-color: rgba(255, 200, 255, 0.3);
    color: #fff;
}

body.theme-nro .modal .btn-secondary:hover {
    background: rgba(139, 45, 107, 0.9);
    border-color: rgba(255, 200, 255, 0.4);
    color: #fff;
}

body.theme-nro .modal .card {
    background: rgba(40, 15, 60, 0.6);
    border-color: rgba(255, 200, 255, 0.2);
}

body.theme-nro .modal .card-title,
body.theme-nro .modal .card-text {
    color: #fff;
}

/* ---------- Alert (form error/success) ---------- */
body.theme-nro .alert-danger {
    background: rgba(220, 53, 69, 0.25);
    border-color: rgba(220, 53, 69, 0.5);
    color: #ffb3b3;
}

body.theme-nro .alert-warning {
    background: rgba(255, 193, 7, 0.2);
    border-color: rgba(255, 193, 7, 0.5);
    color: #ffe066;
}

/* ---------- Button primary (gradient) - giữ như cũ ---------- */
.btn-primary {
    background: linear-gradient(90deg, #4a1560 0%, #6b1d5c 35%, #8b2d6b 70%, #c72471 100%) !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 24px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

.btn-primary:hover {
    color: #fff !important;
    background: linear-gradient(90deg, #5a2068 0%, #7b2d6b 35%, #9b3d7b 70%, #d63384 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(139, 45, 107, 0.5), 0 3px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

.btn-primary:active,
.btn-primary:focus {
    color: #fff !important;
    transform: translateY(0) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.btn-primary.btn-sm {
    padding: 6px 14px !important;
    font-size: 0.875rem !important;
    border-radius: 10px !important;
}

.btn-primary i {
    margin-right: 0.35em;
}
