:root {
    --bg-0: #050b1a;
    --bg-1: #081a33;
    --bg-2: #0a2b4e;
    --panel: rgba(12, 26, 47, 0.92);
    --panel-soft: rgba(255, 255, 255, 0.06);
    --panel-line: rgba(255, 255, 255, 0.12);
    --text: #ffffff;
    --text-soft: rgba(255, 255, 255, 0.72);
    --text-muted: rgba(255, 255, 255, 0.48);
    --accent: #00e5ff;
    --accent-soft: rgba(0, 229, 255, 0.14);
    --success: #00e676;
    --warning: #ff9100;
    --danger: #ff5252;
    --yellow: #ffd600;
    --lime: #b2ff59;
    --aqua: #64ffda;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
    --radius-xl: 26px;
    --radius-lg: 20px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --font-main: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    min-height: 100%;
}

body {
    background:
        radial-gradient(circle at 82% 12%, rgba(0, 229, 255, 0.18), transparent 26%),
        linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 44%, var(--bg-2) 100%);
    color: var(--text);
    font-family: var(--font-main);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(84, 227, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(84, 227, 255, 0.08) 1px, transparent 1px);
    background-size: 52px 52px;
    opacity: 0.28;
    pointer-events: none;
    z-index: -1;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

.hidden {
    display: none !important;
}

/* Login */

.login-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-box {
    width: 100%;
    max-width: 430px;
    padding: 42px 34px;
    border-radius: 28px;
    background: rgba(10, 20, 38, 0.78);
    border: 1px solid rgba(0, 229, 255, 0.24);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.logo-container {
    text-align: center;
    margin-bottom: 28px;
}

.logo {
    width: 118px;
    max-width: 100%;
    filter: drop-shadow(0 0 22px rgba(0, 229, 255, 0.35));
}

.login-box h1 {
    text-align: center;
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-soft);
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
}

.input-group {
    position: relative;
    margin-bottom: 18px;
}

.input-group i {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: var(--accent);
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border-radius: 16px;
    padding: 15px 16px 15px 48px;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.input-group input::placeholder,
.search-box input::placeholder,
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.filter-select:focus,
.search-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.12);
    background: rgba(255, 255, 255, 0.09);
}

.toggle-password {
    right: 16px;
    left: auto !important;
    cursor: pointer;
}

.btn-login,
.btn-save,
.primary-btn {
    border: none;
    border-radius: 16px;
    background: var(--accent);
    color: #001529;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn-login {
    width: 100%;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.btn-login:hover,
.btn-save:hover,
.primary-btn:hover,
.action-btn:hover,
.toolbar-btn:hover,
.icon-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 229, 255, 0.16);
}

.btn-login:disabled,
.btn-save:disabled,
.primary-btn:disabled,
.toolbar-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.forgot-password {
    text-align: center;
    margin-top: 18px;
}

.forgot-password a {
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
}

.error-message {
    min-height: 20px;
    margin-top: 16px;
    color: var(--danger);
    text-align: center;
    display: none;
    font-size: 14px;
}

.error-message.show {
    display: block;
}

/* Dashboard shell */

.dashboard-body {
    min-height: 100vh;
}

.dashboard-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 310px 1fr;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px 18px 20px;
    background: rgba(5, 15, 30, 0.88);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    gap: 18px;
    z-index: 20;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sidebar-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    padding: 6px;
}

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

.sidebar-brand-subtitle {
    color: var(--text-soft);
    font-size: 12px;
}

.sidebar-user-card {
    padding: 18px 16px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 229, 255, 0.06));
    border: 1px solid rgba(0, 229, 255, 0.24);
    text-align: center;
}

.sidebar-user-avatar-wrap {
    width: 74px;
    height: 74px;
    margin: 0 auto 10px;
    position: relative;
}

.sidebar-user-avatar,
.sidebar-user-avatar-placeholder,
.user-avatar,
.user-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.sidebar-user-avatar,
.user-avatar {
    display: none;
    object-fit: cover;
    border: 2px solid var(--accent);
}

.sidebar-user-avatar-placeholder,
.user-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.09);
    color: var(--accent);
    border: 2px solid rgba(0, 229, 255, 0.34);
}

.sidebar-user-name {
    font-weight: 800;
    font-size: 16px;
    line-height: 1.25;
}

.sidebar-user-role {
    color: var(--accent);
    font-size: 12px;
    margin-top: 4px;
}

.sidebar-nav {
    flex: 1;
    overflow: auto;
    padding-right: 2px;
}

.sidebar-section-title {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.sidebar-categories,
.sidebar-modules {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-categories {
    margin-bottom: 18px;
}

.category-item,
.module-nav-item,
.sidebar-logout,
.toolbar-btn,
.user-menu-btn,
.dropdown-item,
.tab-btn {
    border: 1px solid transparent;
    background: transparent;
}

.category-item,
.module-nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    color: var(--text-soft);
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.category-item:hover,
.module-nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.category-item.active,
.module-nav-item.active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 229, 255, 0.24);
    color: var(--text);
}

.category-icon,
.module-nav-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.category-meta,
.module-nav-meta {
    min-width: 0;
}

.category-name,
.module-nav-name {
    font-weight: 700;
    font-size: 14px;
}

.category-hint,
.module-nav-hint {
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 2px;
}

.sidebar-logout {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    color: var(--danger);
    border-color: rgba(255, 82, 82, 0.28);
    background: rgba(255, 82, 82, 0.08);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
}

.workspace {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.workspace-header {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 28px 16px;
    backdrop-filter: blur(18px);
    background: linear-gradient(180deg, rgba(5, 11, 26, 0.94), rgba(5, 11, 26, 0.58));
}

.workspace-header-left,
.workspace-header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.workspace-eyebrow {
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.workspace-title {
    font-size: 26px;
    font-weight: 800;
}

.sidebar-toggle,
.icon-action {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.sidebar-toggle {
    display: none;
}

.icon-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-menu {
    position: relative;
}

.user-menu-btn {
    height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.dropdown-menu {
    min-width: 220px;
    border-radius: 18px;
    padding: 8px;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    background: rgba(5, 15, 30, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow);
    display: none;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.07);
}

.dropdown-item.danger {
    color: var(--danger);
}

.dropdown-divider {
    height: 1px;
    margin: 6px 0;
    background: rgba(255, 255, 255, 0.08);
}

.workspace-main {
    padding: 0 28px 28px;
}

.hero-card {
    position: relative;
    overflow: hidden;
    padding: 26px 28px;
    border-radius: 24px;
    background: rgba(12, 26, 47, 0.86);
    border: 1px solid rgba(0, 229, 255, 0.28);
    box-shadow: var(--shadow);
}

.hero-label {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 10px;
}

.hero-title {
    font-size: 29px;
    font-weight: 900;
    margin-bottom: 8px;
}

.hero-copy {
    max-width: 720px;
    color: var(--text-soft);
    line-height: 1.55;
}

.hero-glow {
    position: absolute;
    right: -30px;
    top: -50px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.24), transparent 65%);
    pointer-events: none;
}

.home-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.module-card {
    position: relative;
    overflow: hidden;
    min-height: 166px;
    padding: 22px 18px;
    border-radius: 24px;
    background: rgba(14, 31, 56, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.module-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.module-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 40%, rgba(255, 255, 255, 0.02));
    pointer-events: none;
}

.module-icon {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 24px;
}

.module-card h3 {
    font-size: 17px;
    font-weight: 800;
    margin-top: 16px;
}

.module-card p {
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.5;
    margin-top: 8px;
}

.module-card .module-card-tag {
    display: inline-flex;
    margin-top: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.iframe-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.module-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 20px;
    background: rgba(12, 26, 47, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.module-toolbar-label {
    color: var(--accent);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 800;
}

.module-toolbar-title {
    font-size: 22px;
    font-weight: 800;
    margin-top: 4px;
}

.module-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.toolbar-btn {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.iframe-wrap {
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(7, 16, 30, 0.88);
    min-height: calc(100vh - 220px);
}

#module-frame {
    width: 100%;
    min-height: calc(100vh - 220px);
    border: 0;
    background: transparent;
}

.notification-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.56);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 50;
    backdrop-filter: blur(8px);
}

.notification-card {
    width: min(640px, 100%);
    max-height: min(82vh, 720px);
    border-radius: 24px;
    background: rgba(5, 15, 30, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.notification-card-header {
    padding: 20px 22px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.notification-card-label {
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 6px;
}

.notification-card-header h3 {
    font-size: 22px;
    font-weight: 800;
}

.notification-list {
    overflow: auto;
    padding: 10px 14px 14px;
}

.notification-item {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    margin-bottom: 10px;
}

.notification-item-title {
    font-weight: 800;
    font-size: 14px;
}

.notification-item-meta {
    color: var(--accent);
    font-size: 12px;
    margin-top: 4px;
}

.notification-item-copy {
    color: var(--text-soft);
    line-height: 1.55;
    font-size: 14px;
    margin-top: 10px;
}

.notification-delete {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(255, 82, 82, 0.25);
    background: rgba(255, 82, 82, 0.08);
    color: var(--danger);
    cursor: pointer;
}

/* Shared module layout */

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    background: rgba(5, 15, 30, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(18px);
}

.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.top-bar-title {
    font-size: 20px;
    font-weight: 800;
}

.top-bar-role {
    color: var(--accent);
    font-size: 12px;
    margin-top: 2px;
}

.page-container {
    min-height: 100vh;
    padding-bottom: 90px;
}

.back-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.action-btn,
.btn-nav,
.btn-icon {
    border: none;
    cursor: pointer;
    color: #001529;
    background: var(--accent);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.action-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 17px;
}

.btn-nav,
.btn-icon {
    min-width: 42px;
    min-height: 42px;
    border-radius: 12px;
}

.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 18px 0;
}

.filter-select,
.search-box input,
.form-group input,
.form-group select,
.form-group textarea {
    min-height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    padding: 10px 14px;
}

.filter-select option,
.form-group select option {
    background: #08203b;
}

.content-area {
    padding: 18px;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
}

.search-box input {
    width: 100%;
    padding-left: 40px;
}

.data-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.data-card,
.chart-container {
    background: rgba(12, 26, 47, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.data-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
}

.data-avatar {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.data-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.data-avatar i {
    color: var(--accent);
    font-size: 24px;
}

.data-info {
    flex: 1;
    min-width: 0;
}

.data-info h3 {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 5px;
}

.data-info p {
    color: var(--text-soft);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
}

.data-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.data-status.activo {
    background: rgba(0, 230, 118, 0.18);
    color: var(--success);
}

.data-status.inactivo {
    background: rgba(255, 82, 82, 0.18);
    color: var(--danger);
}

.data-status.retirado {
    background: rgba(255, 193, 7, 0.18);
    color: var(--yellow);
}

.data-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.data-actions button,
.btn-edit,
.btn-delete {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
}

.btn-edit {
    background: rgba(0, 229, 255, 0.16);
    color: var(--accent);
}

.btn-delete {
    background: rgba(255, 82, 82, 0.16);
    color: var(--danger);
}

.loading,
.empty-state {
    text-align: center;
    padding: 50px 18px;
    color: var(--text-soft);
}

.empty-state.compact {
    padding: 32px 18px;
}

.loading i,
.empty-state i {
    font-size: 38px;
    margin-bottom: 14px;
    color: var(--accent);
}

.table-container {
    overflow: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(12, 26, 47, 0.84);
    border-radius: 18px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
}

.data-table th {
    color: var(--accent);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(255, 255, 255, 0.05);
}

.data-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.chart-container {
    padding: 20px;
}

.chart-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 16px;
}

.tabs-container {
    display: flex;
    gap: 10px;
    padding: 16px 18px 0;
    overflow: auto;
}

.tab-btn {
    padding: 10px 16px;
    border-radius: 14px;
    color: var(--text-soft);
    cursor: pointer;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.tab-btn.active {
    background: var(--accent);
    color: #001529;
    font-weight: 800;
    border-color: var(--accent);
}

.calendar-header {
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.calendar-grid {
    padding: 0 18px 18px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.calendar-day-header {
    text-align: center;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    padding: 8px 4px;
}

.calendar-day {
    min-height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.calendar-day.today {
    border: 2px solid var(--accent);
}

.calendar-day.selected {
    background: var(--accent);
    color: #001529;
}

.calendar-day.other-month {
    opacity: 0.35;
}

.calendar-day.has-event {
    background: rgba(0, 229, 255, 0.18);
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.56);
    z-index: 60;
    backdrop-filter: blur(8px);
}

.modal.show {
    display: flex;
}

.modal-content {
    width: min(520px, 100%);
    max-height: 86vh;
    overflow: auto;
    border-radius: 24px;
    padding: 28px;
    background: rgba(5, 15, 30, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow);
    position: relative;
}

.modal-large {
    max-width: 760px;
}

.close-modal {
    position: absolute;
    top: 14px;
    right: 18px;
    color: var(--text);
    font-size: 28px;
    cursor: pointer;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 16px 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    color: var(--text-soft);
    font-size: 13px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.btn-cancel {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: transparent;
    color: var(--text);
    border-radius: 14px;
    padding: 12px 18px;
    cursor: pointer;
}

.btn-save {
    padding: 12px 18px;
}

.bottom-nav {
    display: none;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    background: rgba(5, 15, 30, 0.96);
    color: var(--text);
    border: 1px solid rgba(0, 229, 255, 0.28);
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: var(--shadow);
    display: none;
    z-index: 80;
}

.toast.show {
    display: block;
}

.toast.success {
    border-color: rgba(0, 230, 118, 0.45);
}

.toast.error {
    border-color: rgba(255, 82, 82, 0.45);
}

/* Embedded modules inside dashboard iframe */

body.embedded-shell::before {
    display: none;
}

body.embedded-shell {
    background: transparent;
}

body.embedded-shell .page-container {
    padding-bottom: 18px;
    min-height: auto;
}

body.embedded-shell .back-btn,
body.embedded-shell .bottom-nav {
    display: none !important;
}

body.embedded-shell .top-bar {
    padding-left: 18px;
}

/* Utility */

.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.slider::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s ease;
}

.switch input:checked + .slider {
    background: rgba(0, 230, 118, 0.7);
}

.switch input:checked + .slider::before {
    transform: translateX(22px);
}

/* Responsive */

@media (max-width: 1140px) {
    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: min(320px, 88vw);
        transform: translateX(-105%);
        transition: transform 0.24s ease;
        box-shadow: var(--shadow);
    }

    .dashboard-shell.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: inline-flex;
    }
}

@media (max-width: 780px) {
    .workspace-header,
    .workspace-main,
    .filters-bar,
    .content-area,
    .calendar-header,
    .calendar-grid,
    .tabs-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .workspace-header {
        padding-top: 16px;
        padding-bottom: 14px;
    }

    .workspace-main {
        padding-bottom: 20px;
    }

    .workspace-title {
        font-size: 22px;
    }

    .workspace-header-right {
        gap: 10px;
    }

    #header-user-name {
        display: none;
    }

    .hero-card {
        padding: 22px 20px;
    }

    .hero-title {
        font-size: 24px;
    }

    .module-toolbar {
        padding: 16px;
    }

    .module-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .module-toolbar-actions {
        width: 100%;
    }

    .home-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .data-card {
        flex-wrap: wrap;
    }

    .data-actions {
        margin-left: auto;
    }
}

@media (max-width: 520px) {
    .login-box {
        padding: 34px 22px;
    }

    .home-grid {
        grid-template-columns: 1fr;
    }

    .notification-item {
        grid-template-columns: 1fr;
    }

    .user-menu-btn {
        padding: 0 12px;
    }
}
