﻿@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ===== Reset & Base ===== */

.content {
    margin-left: 220px; /* chừa chỗ sidebar */
    min-height: 100vh;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/*Chinh mau nen noi dung*/
body {
    font-family: "Inter", system-ui, "Segoe UI Variable", "Segoe UI", -apple-system, Roboto, sans-serif;
    background: #111317;
    color: #e0e0e0;
    line-height: 1.5;
}

/* Container chính
.container {
  display: flex;
  min-height: 100vh;
}*/

/* ===== Sidebar ===== */
/*Chinh gioi han chieu ngang logo MONITOR*/
.sidebar {
    width: 220px;
    min-height: 100vh;
    background: #0d0f13;
    padding-top: 20px;
    position: fixed;
    top: 0;
    left: 0;
}

    .sidebar .logo {
        color: #fff;
        text-align: center;
        margin-bottom: 20px;
        font-size: 20px;
        font-weight: bold;
    }

    /*.sidebar ul {
  list-style: none;
  padding: 0;
}*/

    /*khoang cach object in menu*/
    .sidebar ul li {
        margin: 6px 0;
    }
        /*chinh object menu*/
        .sidebar ul li a {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 16px;
            color: #ccc;
            text-decoration: none;
            border-radius: 6px;
            border: 1px solid transparent;
            transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
        }

            /*nen object khi re chuot vao*/
            .sidebar ul li a:hover {
                background: #161b22;
                color: #f0f6fc;
            }

            .sidebar ul li a.active {
                background: rgba(56, 139, 253, 0.11);
                border-color: rgba(88, 166, 255, 0.22);
                box-shadow: inset 3px 0 0 #58a6ff;
                color: #f0f6fc !important;
            }

                .sidebar ul li a.active i {
                    color: #58a6ff;
                }

.sidebar ul {
    list-style: none;
    padding: 0 8px;
}

.sidebar-tree-root {
    justify-content: space-between;
}

.sidebar-tree-arrow {
    margin-left: auto;
    color: #8b949e;
    font-size: 18px;
    line-height: 1;
    transition: transform .16s ease;
}

.sidebar-tree-children {
    display: none;
    list-style: none;
    margin: 2px 0 4px 12px;
    padding: 2px 0 2px 10px;
    border-left: 2px solid #30363d;
}

.sidebar-tree-children.open {
    display: block;
}

.sidebar-tree-children li {
    margin: 2px 0;
}

.sidebar-tree-children a {
    padding: 8px 12px !important;
    color: #aeb8c4 !important;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid transparent;
}

.sidebar-tree-children a:hover {
    color: #f0f6fc !important;
    background: #1c1f26;
}

.sidebar-tree-children a.active {
    color: #f0f6fc !important;
    background: rgba(56, 139, 253, 0.11);
    border-color: rgba(88, 166, 255, 0.18);
    box-shadow: inset 3px 0 0 #58a6ff;
}

/* ===== Main content ===== */
.main-content {
    flex: 1;
    margin-left: 220px; /* tránh bị sidebar đè */
    padding: 20px;
}

/* ===== Topbar ===== */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1c1f26;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

    .topbar .title {
        font-size: 18px;
        font-weight: bold;
    }

    .topbar .user-info {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .topbar .user-info,
    .topbar .user-info * {
        font-family: "Inter", system-ui, "Segoe UI Variable", "Segoe UI", -apple-system, Roboto, sans-serif;
        font-size: 14px;
        line-height: 1.35;
    }

    .topbar .user-info .user-menu {
        position: relative;
    }

    .topbar .user-info .user-menu-trigger {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: transparent;
        border: 1px solid transparent;
        color: #c9d1d9;
        border-radius: 8px;
        padding: 7px 10px;
        font-weight: 500;
        cursor: pointer;
    }

    .topbar .user-info .user-menu-trigger:hover,
    .topbar .user-info .user-menu-trigger:focus {
        background: #21262d;
        border-color: #30363d;
        outline: none;
    }

    .topbar .user-info .user-menu-name {
        color: #f0f6fc;
        font-weight: 700;
    }

    .topbar .user-info .user-menu-caret {
        color: #8b949e;
        font-size: 12px;
    }

    .topbar .user-info .user-menu-dropdown {
        display: none;
        position: absolute;
        right: 0;
        top: calc(100% + 8px);
        z-index: 2000;
        min-width: 178px;
        padding: 6px;
        background: #161b22;
        border: 1px solid #30363d;
        border-radius: 8px;
        box-shadow: 0 14px 36px rgba(0,0,0,.42);
    }

    .topbar .user-info .user-menu-dropdown.open {
        display: grid;
        gap: 3px;
    }

    .topbar .user-info .user-menu-dropdown button {
        width: 100%;
        text-align: left;
        background: transparent;
        border: 0;
        color: #e6edf3;
        border-radius: 6px;
        padding: 8px 10px;
        cursor: pointer;
    }

    .topbar .user-info .user-menu-dropdown button:hover {
        background: #21262d;
    }

.change-password-backdrop {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.62);
    padding: 20px;
}

.change-password-backdrop.open {
    display: flex;
}

.change-password-modal {
    width: min(460px, calc(100vw - 32px));
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 10px;
    box-shadow: 0 20px 70px rgba(0,0,0,.5);
    color: #e6edf3;
    font-family: "Inter", system-ui, "Segoe UI Variable", "Segoe UI", -apple-system, Roboto, sans-serif;
}

.change-password-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #30363d;
}

.change-password-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.change-password-close {
    background: transparent;
    border: 0;
    color: #8b949e;
    font-size: 22px;
    line-height: 1;
    padding: 2px 7px;
}

.change-password-close:hover {
    color: #e6edf3;
    background: #21262d;
}

.change-password-form {
    display: grid;
    gap: 13px;
    padding: 16px;
}

.change-password-form label {
    display: grid;
    gap: 6px;
    color: #9fb0c3;
    font-size: 13px;
    font-weight: 600;
}

.password-input-wrap {
    display: grid;
    grid-template-columns: 1fr 38px;
    align-items: center;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    overflow: hidden;
}

.password-input-wrap:focus-within {
    border-color: #388bfd;
}

.password-input-wrap input {
    border: 0;
    background: transparent;
    color: #e6edf3;
    padding: 10px 12px;
    outline: none;
}

.password-eye-btn {
    height: 100%;
    background: transparent;
    border: 0;
    border-left: 1px solid #30363d;
    color: #c9d1d9;
    border-radius: 0;
    padding: 0;
}

.password-eye-btn:hover {
    background: #21262d;
}

.password-policy-note {
    color: #8b949e;
    background: #0d1117;
    border: 1px solid #21262d;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.5;
}

.change-password-message {
    min-height: 18px;
    font-size: 13px;
}

.change-password-message.error {
    color: #ff7b72;
}

.change-password-message.success {
    color: #3fb950;
}

.change-password-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.change-password-actions button.secondary {
    background: #21262d;
    border: 1px solid #30363d;
    color: #e6edf3;
}

/* ===== Card (khối nội dung) ===== */
.card {
    background: #1c1f26;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* ===== Table ===== */
table {
    width: 100%;
    border-collapse: collapse;
}

    table th,
    table td {
        padding: 10px 12px;
        border-bottom: 1px solid #333;
    }

    table th {
        text-transform: uppercase;
        font-size: 13px;
        color: #aaa;
    }

    table tr:hover {
        background: #22252d;
    }

/* ===== Form ===== */
input,
select,
button {
    font-size: 14px;
    border: none;
    border-radius: 6px;
}

input,
select {
    padding: 8px 12px;
    background: #1c1f26;
    color: #e0e0e0;
    border: 1px solid #333;
}

    input:focus,
    select:focus {
        outline: none;
        border-color: #2563eb;
    }

/* ===== Buttons ===== */
button {
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.2s;
}

    button:hover {
        opacity: 0.9;
    }

    button:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    /* Kiểu riêng cho các loại button */
    button[type="submit"],
    button.primary {
        background: #2563eb;
        color: #fff;
    }

    button.danger {
        background: #dc2626;
        color: #fff;
    }

    button.success,
    .btn-create {
        background: #16a34a;
        color: #fff;
    }

/* ===== Hidden class ===== */
.hidden {
    display: none;
}

/* ===== Unified Topbar User Menu Override =====
   Keep the account dropdown identical across pages even when page-level CSS
   defines broad button styles. */
.topbar .user-info .user-menu {
    position: relative !important;
    display: inline-block !important;
}

.topbar .user-info .user-menu-trigger {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    width: auto !important;
    margin: 0 !important;
    padding: 7px 10px !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    color: #c9d1d9 !important;
    font-family: "Inter", system-ui, "Segoe UI Variable", "Segoe UI", -apple-system, Roboto, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
    font-weight: 500 !important;
    box-shadow: none !important;
}

.topbar .user-info .user-menu-trigger:hover,
.topbar .user-info .user-menu-trigger:focus {
    background: #21262d !important;
    border-color: #30363d !important;
    opacity: 1 !important;
    outline: none !important;
}

.topbar .user-info .user-menu-name {
    color: #f0f6fc !important;
    font-weight: 700 !important;
}

.topbar .user-info .user-menu-caret {
    color: #8b949e !important;
    font-size: 12px !important;
}

.topbar .user-info .user-menu-dropdown {
    display: none !important;
    position: absolute !important;
    right: 0 !important;
    top: calc(100% + 8px) !important;
    z-index: 2000 !important;
    min-width: 178px !important;
    padding: 6px !important;
    background: #161b22 !important;
    border: 1px solid #30363d !important;
    border-radius: 8px !important;
    box-shadow: 0 14px 36px rgba(0,0,0,.42) !important;
}

.topbar .user-info .user-menu-dropdown.open {
    display: grid !important;
    gap: 3px !important;
}

.topbar .user-info .user-menu-dropdown button {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 8px 10px !important;
    text-align: left !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 6px !important;
    color: #e6edf3 !important;
    font-family: "Inter", system-ui, "Segoe UI Variable", "Segoe UI", -apple-system, Roboto, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
    font-weight: 500 !important;
    box-shadow: none !important;
}

.topbar .user-info .user-menu-dropdown button:hover,
.topbar .user-info .user-menu-dropdown button:focus {
    background: #21262d !important;
    opacity: 1 !important;
    outline: none !important;
}
