:root {
    --brand: rgb(33, 37, 41);
    --bs-border-radius: 1rem;
    --bs-border-radius-sm: 0.5rem;
    --bs-border-radius-lg: 1rem;
    --bs-border-radius-xl: 1.25rem;
    --bs-border-radius-xxl: 1.75rem;
    --bs-border-radius-2xl: var(--bs-border-radius-xxl);
    --bs-border-radius-pill: 50rem;
    --bs-primary: var(--brand);
    --bs-primary-rgb: 25, 135, 84;

    --bs-link-color: var(--brand);
    --bs-link-hover-color: rgb(25, 135, 84);

    --bg-dark: #070812;
    --bg: #e6e6e6;

    --dark-card: rgb(33, 37, 41);
    --card: #ffffff;

    --text: #000000;
    --muted: rgba(0,0,0,0.6);
    --border: rgba(0,0,0,0.08);
}
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Roboto", sans-serif;
    font-size: 14px;
    line-height: 1.4;

    background: var(--bg);
    color: var(--text);

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, textarea, select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

p {
    margin: 0;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 600;
}

:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

body.site-login {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Roboto", sans-serif;
    height: 100vh;
    background:
        radial-gradient(1200px 700px at 20% 20%, rgba(32, 104, 240, .25), transparent 55%),
        radial-gradient(900px 600px at 80% 70%, rgba(82, 148, 255, .20), transparent 55%),
        radial-gradient(700px 400px at 50% 50%, rgba(37, 117, 252, .12), transparent 60%),
        var(--bg-dark);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* fast looping motion */
@keyframes magicMove {
    0% {
        transform: translate(-20px, -10px) scale(1);
    }
    25% {
        transform: translate(30px, 10px) scale(1.05);
    }
    50% {
        transform: translate(10px, -25px) scale(1.08);
    }
    75% {
        transform: translate(-25px, 20px) scale(1.03);
    }
    100% {
        transform: translate(-20px, -10px) scale(1);
    }
}

@keyframes magicMove2 {
    0% {
        transform: translate(15px, 20px) scale(1);
    }
    25% {
        transform: translate(-20px, -15px) scale(1.06);
    }
    50% {
        transform: translate(25px, -10px) scale(1.1);
    }
    75% {
        transform: translate(-10px, 25px) scale(1.04);
    }
    100% {
        transform: translate(15px, 20px) scale(1);
    }
}

/* content stays above */
.auth-layout {
    position: relative;
    z-index: 1;
}

.auth-layout {
    width: 100%;
    max-width: 980px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    padding: 40px;
}

.auth-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-dot {
    width: 14px;
    height: 14px;
    background: var(--brand);
    border-radius: 4px;
    margin-bottom: 18px;
}

.auth-heading {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 14px;
}

.auth-text {
    font-size: 15px;
    color: var(--muted);
    max-width: 420px;
    line-height: 1.6;
}

.auth-right {
    display: flex;
    align-items: center;
}

.auth-card {
    width: 100%;
    background: rgba(15,17,26,0.9);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 34px;
}

.auth-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.auth-subtitle {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 24px;
}

.auth-field {
    margin-bottom: 12px;
}

.auth-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    color: #000000;
    outline: none;
    transition: 0.15s;
    font-size: 14px;
}

.auth-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(18,2,237,0.18);
}

.auth-button {
    width: 100%;
    padding: 12px 14px;
    border: none;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: 0.15s;
    margin-top: 10px;
}

.auth-button:hover {
    opacity: 0.92;
}

.auth-footer {
    margin-top: 16px;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
}

.auth-footer a {
    color: var(--brand);
    text-decoration: none;
}

@media (max-width: 900px) {
    .auth-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .auth-heading {
        font-size: 32px;
    }
}

.app-topbar {
    background: var(--brand);
    color: #fff;
    height: 44px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
}

.modal {
    z-index: 1200;
}

.modal-backdrop {
    z-index: 1190;
}

.app-topbar-brand {
    font-weight: 600;
    letter-spacing: 0.3px;
}

.app-logo-dot {
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 3px;
}
.app-user-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 6px 10px;
    border-radius: 10px;

    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);

    color: #fff;
    cursor: pointer;

    transition: 0.15s;
}

.app-user-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.28);
}

.app-user-icon {
    font-size: 13px;
    opacity: 0.9;
}

.app-user-name {
    font-size: 13px;
    font-weight: 500;
}

.app-user-caret {
    font-size: 10px;
    opacity: 0.7;
}

.app-user-menu {
    min-width: 200px;
    padding: 6px;
    border-radius: 12px;

    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.app-user-header {
    padding: 8px 10px;
}

.app-user-title {
    font-size: 14px;
    font-weight: 600;
    color: #111;
}

.app-user-subtitle {
    font-size: 12px;
    color: rgba(0,0,0,0.5);
}

.app-user-menu .dropdown-item {
    font-size: 14px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #111;
}

.app-user-menu .dropdown-item:hover {
    background: rgba(18,2,237,0.08);
    color: var(--brand);
}

.app-main {
    margin-left: 260px;
    padding-top: 44px;
}

.sidebar {
    width: 260px;
    position: fixed;
    top: 44px;
    left: 0;
    height: calc(100vh - 44px);

    overflow-y: auto;

    background: var(--dark-card);
    border-right: 1px solid rgba(255,255,255,0.06);
    z-index: 1000;
}

.sidebar-inner {
    padding: 10px;
}

.sidebar-group-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    padding: 6px 6px;
}

.sidebar-group + .sidebar-group {
    margin-top: 10px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 8px 10px;
    border-radius: 10px;

    color: rgba(255,255,255,0.7);
    text-decoration: none;

    font-size: 14px;
    position: relative;

    transition: 0.15s ease;
}

.sidebar-item:hover {
    background: rgba(37, 117, 252, 0.10);
    color: #fff;
}

.sidebar-item.active {
    background: rgba(37, 117, 252, 0.15);
    color: #fff;
    font-weight: 500;
}

.sidebar-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 3px;
    background: var(--brand);
}

.sidebar-icon {
    font-size: 14px;
    opacity: 0.9;
    width: 18px;
    text-align: center;
}

.sidebar-label {
    line-height: 1.2;
}

@media (max-width: 991px) {

    .sidebar {
        left: -260px;
        top: 44px;
        height: calc(100vh - 44px);
        transition: 0.2s ease;
    }

    body.sidebar-open .sidebar {
        left: 0;
    }

    .app-main {
        margin-left: 0;
    }
}
.dashboard-card {
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    transition: 0.15s ease;
    background: #fff;
}

.dashboard-panel:hover,
.dashboard-card:hover {
    border-color: rgba(18,2,237,0.25);
    box-shadow: 0 10px 25px rgba(18,2,237,0.08);
}

.dashboard-card-label {
    font-size: 12px;
    color: rgba(0,0,0,0.55);
}

.dashboard-card-value {
    font-size: 26px;
    font-weight: 700;
    margin-top: 6px;
}

.dashboard-card-meta {
    font-size: 12px;
    color: rgba(0,0,0,0.45);
    margin-top: 4px;
}

.dashboard-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(18,2,237,0.08);
    color: var(--brand);
    font-size: 18px;
}

.dashboard-panel {
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    background: #fff;
}
.dashboard-mini-stat {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.dashboard-mini-stat:last-of-type {
    border-bottom: none;
}

.dashboard-mini-stat .label {
    font-size: 12px;
    color: rgba(0,0,0,0.55);
}

.dashboard-mini-stat .value {
    font-size: 18px;
    font-weight: 700;
}

.app-table-card {
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.app-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(0,0,0,0.5);
    border-bottom: 1px solid rgba(0,0,0,0.06) !important;
}

.app-table td {
    font-size: 14px;
}

.app-badge-success {
    background: rgba(34,197,94,0.12);
    color: #16a34a;
    font-weight: 500;
    user-select:none;
    -webkit-user-select:none;
}

.app-badge-danger {
    background: rgba(197, 34, 34, 0.12);
    color: #a32c16;
    font-weight: 500;
    user-select:none;
    -webkit-user-select:none;
}

.app-badge-secondary {
    background: rgba(0,0,0,0.06);
    color: rgba(0,0,0,0.6);
    font-weight: 500;
    user-select:none;
    -webkit-user-select:none;
}

.app-badge-primary {
    background: rgba(18,2,237,0.18);
    color: rgba(0,0,0,0.6);
    font-weight: 500;
}

.app-form-card {
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    background: #fff;
}

.app-input,
.app-select {
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.08);
    padding: 10px 12px;
    transition: 0.15s ease;
}

.app-input:focus,
.app-select:focus {
    border-color: #1202ed;
    box-shadow: 0 0 0 3px rgba(18,2,237,0.12);
}

.app-form label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(0,0,0,0.7);
    margin-bottom: 6px;
}

.btn-primary {
    background-color: var(--brand);
    border-color: var(--brand);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #0f02c7;
    border-color: #0f02c7;
}

.btn-outline-primary {
    color: var(--brand);
    border-color: var(--brand);
}

.btn-outline-primary:hover {
    background-color: var(--brand);
    border-color: var(--brand);
    color: #fff;
}


.chat-history {
    background: #f5f7fb;
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.chat-message {
    display: flex;
    margin-bottom: 5px;;
}

.chat-message-client {
    justify-content: flex-start;
}

.chat-message-admin {
    justify-content: flex-end;
}

.chat-message-box {
    max-width: 75%;
    padding: 14px 16px;
    border-radius: 16px;
    position: relative;
}

.chat-message-client .chat-message-box {
    background: #ffffff;
    border: 1px solid #dee2e6;
}

.chat-message-client .chat-message-box.new-message {
    background: #02a264;
    color: #ffffff;
}

.chat-message-admin .chat-message-box {
    background: var(--brand);
    color: #ffffff;
}

.chat-message-header {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    opacity: 0.85;
}

.chat-message-text {
    font-size: 15px;
    line-height: 1.5;
    word-break: break-word;
}

.chat-message-date {
    font-size: 12px;
    margin-top: 10px;
    opacity: 0.7;
}

body.sn-fullscreen-mode .note-editor.fullscreen {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    background: #fff;
}

body.sn-fullscreen-mode .app-topbar {
    z-index: 0 !important;
}

body.sn-fullscreen-mode .note-modal,
body.sn-fullscreen-mode .note-popover,
body.sn-fullscreen-mode .note-tooltip {
    z-index: 100000 !important;
}