:root {
    --bg-primary: #f4f6f9;
    --sidebar-bg: #16264c;
    --sidebar-hover: #304a87;
    --accent-color: #3b82f6;
    --text-light: #f8fafc;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --header-bg: #ffffff;
    --border-color: #e2e8f0;
}

/* =========================
   GLOBAL
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", sans-serif;
}

body {
    background: var(--bg-primary);
    display: flex;
    min-height: 100vh;
    overflow: hidden;
}

/* =========================
   SIDEBAR
========================= */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.sidebar-brand {
    padding: 24px;
    font-size: 24px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.menu-item-group {
    margin-bottom: 5px;
}

.menu-item,
.submenu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    color: #dbeafe;
    text-decoration: none;
    transition: 0.3s;
    font-size: 14px;
    cursor: pointer;
}

.menu-item:hover,
.submenu-item:hover {
    background: var(--sidebar-hover);
    color: white;
}

.menu-item.active {
    background: var(--sidebar-hover);
    color: white;
}

.menu-item i,
.submenu-item i {
    width: 15px;
}

/* =========================
   SUBMENU
========================= */
.arrow-icon {
    margin-left: auto;
    transition: 0.3s;
    font-size: 12px;
}

.submenu {
    list-style: none;
    background: #0f172a;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.has-dropdown.open .submenu {
    max-height: 300px;
}

.has-dropdown.open .arrow-icon {
    transform: rotate(90deg);
}

.submenu-item {
    padding-left: 55px;
    font-size: 13px;
}

.submenu-item.active {
    background: #304a87;
    color: white;
}

/* =========================
   MAIN CONTENT
========================= */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* =========================
   HEADER
========================= */
.header {
    height: 70px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

/* =========================
   USER PROFILE
========================= */
.user-profile {
    position: relative;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.profile-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #1e3a8a;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.profile-dropdown {
    position: absolute;
    right: 0;
    top: 55px;
    width: 220px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    display: none;
    z-index: 100;
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    text-decoration: none;
    color: #1e293b;
    font-size: 14px;
    transition: 0.3s;
}

.dropdown-item:hover {
    background: #f8fafc;
}

.dropdown-divider {
    height: 1px;
    background: #e2e8f0;
}

/* =========================
   BODY CONTENT
========================= */
.content-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

/* =========================
   DASHBOARD CARDS
========================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}

.dashboard-card {
    background: white;
    border-radius: 16px;
    padding: 35px 25px;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
    min-height: 180px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

.dashboard-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20px;
    width: 5px;
    height: 70%;
    border-radius: 10px;
}

/* Card Colors */
.card-blue::before {
    background: #3b82f6;
}

.card-green::before {
    background: #10b981;
}

.card-yellow::before {
    background: #f59e0b;
}

.card-purple::before {
    background: #8b5cf6;
}

.card-red::before {
    background: #ef4444;
}

/* =========================
   CARD CONTENT
========================= */
.card-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 30px;
}

.icon-blue {
    background: #dbeafe;
    color: #3b82f6;
}

.icon-green {
    background: #d1fae5;
    color: #10b981;
}

.icon-yellow {
    background: #fef3c7;
    color: #f59e0b;
}

.icon-purple {
    background: #ede9fe;
    color: #8b5cf6;
}

.icon-red {
    background: #fee2e2;
    color: #ef4444;
}

.dashboard-card h3 {
    text-align: center;
    font-size: 18px;
    margin-bottom: 10px;
    color: #0f172a;
}

.dashboard-card p {
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

/* =========================
   PROFILE PAGE
========================= */
.profile-container {
    padding: 20px;
}

.profile-card-main {
    background: white;
    border-radius: 16px;
    padding: 35px;
    max-width: 950px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.profile-card-header h2 {
    font-size: 32px;
    color: #0f172a;
    margin-bottom: 35px;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

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

.form-group label {
    margin-bottom: 10px;
    font-size: 14px;
    color: #475569;
    font-weight: 600;
}

.profile-input {
    height: 52px;
    border: 1px solid #dbe2ea;
    border-radius: 10px;
    padding: 0 15px;
    font-size: 15px;
    background: #f8fafc;
}

.profile-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.profile-btn-section {
    margin-top: 35px;
}

.profile-save-btn {
    background: linear-gradient(90deg,
            #3b82f6,
            #2563eb);
    border: none;
    color: white;
    padding: 14px 28px;
    border-radius: 10px;
    min-width: 220px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.profile-save-btn:hover {
    opacity: 0.95;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {
    .profile-form-grid {
        grid-template-columns: 1fr;
    }

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

    .sidebar {
        width: 220px;
    }
}

/* Dashboard card color fix */
.dashboard-card {
    border-left: 5px solid transparent;
}

.dashboard-card.card-blue {
    border-left-color: #3b82f6;
}

.dashboard-card.card-green {
    border-left-color: #10b981;
}

.dashboard-card.card-orange,
.dashboard-card.card-yellow {
    border-left-color: #f59e0b;
}

.dashboard-card.card-purple {
    border-left-color: #8b5cf6;
}

.dashboard-card.card-red {
    border-left-color: #ef4444;
}

.dashboard-card.card-blue .card-icon,
.dashboard-card.card-blue i {
    color: #3b82f6;
}

.dashboard-card.card-green .card-icon,
.dashboard-card.card-green i {
    color: #10b981;
}

.dashboard-card.card-orange .card-icon,
.dashboard-card.card-orange i,
.dashboard-card.card-yellow .card-icon,
.dashboard-card.card-yellow i {
    color: #f59e0b;
}

.dashboard-card.card-purple .card-icon,
.dashboard-card.card-purple i {
    color: #8b5cf6;
}

.dashboard-card.card-red .card-icon,
.dashboard-card.card-red i {
    color: #ef4444;
}


/* ============================= */
/* CHANGE PASSWORD PAGE */
/* ============================= */
.password-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 40px;
}

.password-card {
    width: 100%;
    max-width: 650px;
    background: #ffffff;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.password-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #111827;
}

.password-group {
    margin-bottom: 22px;
}

.password-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    width: 100%;
    height: 48px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 0 45px 0 15px;
    font-size: 14px;
    outline: none;
    transition: 0.2s;
}

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

.toggle-password {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6b7280;
}

.password-rules {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 25px;
}

.password-rules h4 {
    margin-bottom: 15px;
    color: #111827;
    font-size: 15px;
}

.rules-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.rule-item {
    font-size: 14px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rule-item.valid {
    color: #10b981;
}

.rule-item.valid i {
    color: #10b981;
}

.update-password-btn {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.update-password-btn:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

/* =============================
   CHANGE PASSWORD PAGE
============================= */
.password-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 40px;
}

.password-card {
    width: 100%;
    max-width: 650px;
    background: #ffffff;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.password-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #111827;
}

.password-group {
    margin-bottom: 22px;
}

.password-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    width: 100%;
    height: 48px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 0 45px 0 15px;
    font-size: 14px;
    outline: none;
}

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

.toggle-password {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6b7280;
}

.password-rules {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 25px;
}

.password-rules h4 {
    margin-bottom: 15px;
    color: #111827;
    font-size: 15px;
}

.rules-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.rule-item {
    font-size: 14px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rule-item.valid {
    color: #10b981;
}

.rule-item.valid i {
    color: #10b981;
}

.update-password-btn {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.update-password-btn:hover {
    opacity: 0.95;
}


/* LOGIN PAGE */
.login-page {
    background: #f4f6f9;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.login-card {
    width: 420px;
    background: white;
    padding: 38px;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.login-logo {
    text-align: center;
    margin-bottom: 25px;
}

.login-logo h1 {
    font-size: 26px;
    color: #0f172a;
}

.logo-mark {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #3b82f6, #10b981);
    margin: 0 auto 12px;
    border-radius: 12px;
}

.login-card h2 {
    font-size: 24px;
    color: #0f172a;
    margin-bottom: 6px;
}

.login-card p {
    color: #64748b;
    margin-bottom: 22px;
}

.login-group {
    margin-bottom: 18px;
}

.login-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 7px;
    color: #334155;
}

.login-group input {
    width: 100%;
    height: 46px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 14px;
}

.login-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-bottom: 22px;
}

.login-row a {
    color: #2563eb;
    text-decoration: none;
}

.login-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.login-footer {
    text-align: center;
    font-size: 12px;
    margin-top: 18px;
}

/* =============================
   CREATE USER PAGE
============================= */
.user-form-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 40px;
}

.user-form-card {
    width: 100%;
    max-width: 520px;
    background: #ffffff;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.user-form-card h2 {
    font-size: 26px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 28px;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    height: 48px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 0 15px;
    font-size: 14px;
    outline: none;
    background: #ffffff;
}

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

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 28px;
}

.btn-cancel {
    flex: 1;
    height: 48px;
    border: none;
    border-radius: 10px;
    background: #e5e7eb;
    color: #374151;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary {
    flex: 1;
    height: 48px;
    border: none;
    border-radius: 10px;
    background: #3b82f6;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary:hover {
    background: #2563eb;
}

.form-message {
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 600;
}

.form-message.error {
    color: #ef4444;
}

.form-message.success {
    color: #10b981;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.table-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}

.add-user-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.table-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 22px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.table-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.table-actions button {
    border: 1px solid #d1d5db;
    background: white;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
}

.table-actions input {
    margin-left: auto;
    width: 220px;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
}

.user-table th,
.user-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    font-size: 14px;
}

.user-table th {
    font-weight: 700;
    color: #374151;
}

.status-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #d1d5db;
    border-radius: 20px;
    transition: 0.3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

.status-switch input:checked+.slider {
    background-color: #10b981;
}

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

.icon-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    margin-right: 10px;
    font-size: 15px;
}

.icon-btn.edit {
    color: #3b82f6;
}

.icon-btn.delete {
    color: #ef4444;
}

.table-footer {
    margin-top: 15px;
    font-size: 14px;
    color: #6b7280;
}

.text-center {
    text-align: center;
}

/* =============================
   USER TABLE
============================= */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.table-header h2 {
    font-size: 24px;
    font-weight: 700;
}

.add-user-btn {
    border: none;
    background: #3b82f6;
    color: white;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.table-card {
    background: white;
    border-radius: 14px;
    padding: 20px;
    border: 1px solid #e5e7eb;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
}

.user-table th,
.user-table td {
    padding: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.icon-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    margin-right: 10px;
    font-size: 16px;
}

.icon-btn.edit {
    color: #3b82f6;
}

.icon-btn.delete {
    color: #ef4444;
}

.status-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
}

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

.slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background-color: #d1d5db;
    border-radius: 20px;
    transition: 0.3s;
}

.slider:before {
    position: absolute;
    content: "";
    width: 16px;
    height: 16px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.status-switch input:checked+.slider {
    background: #10b981;
}

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

/* =============================
   EDIT USER PAGE
============================= */
.user-form-wrapper {
    display: flex;
    justify-content: center;
    padding-top: 40px;
}

.user-form-card {
    width: 100%;
    max-width: 650px;
    background: white;
    border-radius: 16px;
    padding: 35px;
    border: 1px solid #e5e7eb;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.06);
}

.user-form-card h2 {
    margin-bottom: 25px;
    color: #111827;
    font-size: 26px;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
}

.form-group input,
.form-group select {
    width: 100%;
    height: 48px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 0 15px;
    font-size: 14px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn-cancel,
.btn-primary {
    flex: 1;
    height: 48px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

.btn-cancel {
    background: #e5e7eb;
    color: #374151;
}

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

.form-message {
    margin-bottom: 15px;
    font-weight: 600;
    color: #ef4444;
}

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 14px 25px;
    margin-top: 12px;
}

.permissions-grid label {
    font-size: 13px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}

.permissions-grid input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* =============================
   ROLE CREATE / EDIT SCROLL FIX
============================= */
body {
    overflow-y: auto;
}

.main-content {
    overflow-y: auto;
}

.content-body {
    overflow-y: auto;
    max-height: calc(100vh - 65px);
}

/* Role form card scroll */
.user-form-card {
    max-height: 85vh;
    overflow-y: auto;
    padding-right: 18px;
}

/* Permissions checkbox area scroll */
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 14px 25px;
    margin-top: 12px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 10px;
}

.permissions-grid label {
    font-size: 13px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}

.permissions-grid input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f7fb;
    color: #1f2937;
}

.sidebar {
    width: 230px;
    height: 100vh;
    background: #13213a;
    color: white;
    position: fixed;
    left: 0;
    top: 0;
}

.sidebar h2 {
    text-align: center;
    padding: 25px 0;
    margin: 0;
    font-size: 22px;
}

.sidebar a {
    display: block;
    color: white;
    padding: 14px 25px;
    text-decoration: none;
    font-size: 12px;
}

.sidebar a:hover,
.sidebar a.active {
    background: #2d6cdf;
}

.submenu a {
    background: #111827;
    padding-left: 45px;
}

.main {
    margin-left: 230px;
    min-height: 100vh;
}

.topbar {
    height: 65px;
    background: white;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 30px;
    border-bottom: 1px solid #ddd;
}

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

.avatar {
    background: #1f4ea3;
    color: white;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.content {
    padding: 30px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.add-btn {
    background: #2d6cdf;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.icon-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    margin: 2px;
}

.icon-btn.edit {
    color: #2d6cdf;
}

.icon-btn.delete {
    color: #dc2626;
}

.status-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
}

.status-switch input {
    display: none;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #aaa;
    border-radius: 20px;
}

.slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: .3s;
}

.status-switch input:checked+.slider {
    background: #31b07b;
}

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

table.dataTable {
    background: white;
}


body {
    margin: 0;
    padding: 0;
    background: #f5f7fb;
    font-family: Arial, sans-serif;
}

/* SIDEBAR */
.sidebar {
    width: 250px;
    height: 100vh;
    background: #08142b;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    z-index: 1000;
}

/* MAIN CONTENT */
.main-content {
    margin-left: 250px;
    width: calc(100% - 250px);
    min-height: 100vh;
    background: #f5f7fb;
}

/* HEADER */
.header {
    height: 70px;
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    border-bottom: 1px solid #e5e7eb;
}

/* PAGE */
.page-content {
    padding: 25px;
}

/* CARD */
.content-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* TOP */
.page-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* TABLE */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

/* BUTTON */
.btn {
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-secondary {
    background: #d1d5db;
    color: black;
}

/* FORM */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-control {
    height: 42px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0 12px;
}

/* ACTIONS */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
}

/* STATUS SWITCH */
.status-switch {
    position: relative;
    display: inline-block;
    width: 45px;
    height: 24px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #ccc;
    border-radius: 34px;
    transition: 0.3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.status-switch input:checked+.slider {
    background: #22c55e;
}

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

/* ==========================================
   CONTENT CARD
========================================== */
.content-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ==========================================
   HEADER
========================================== */
.mapping-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.mapping-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
}

/* ==========================================
   SEARCH SECTION
========================================== */
.symbol-search-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.symbol-search-input {
    width: 220px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    outline: none;
    font-size: 14px;
}

/* ==========================================
   BUTTON FIX
========================================== */
.add-mapping-btn,
.symbol-search-btn,
.show-all-btn {
    width: auto !important;
    min-width: auto !important;
    padding: 10px 18px !important;
    white-space: nowrap;
}

/* ==========================================
   DATATABLE
========================================== */
.dataTables_wrapper {
    width: 100%;
}

.dt-buttons {
    margin-bottom: 15px;
}

.dataTables_filter {
    margin-bottom: 15px;
}

table.dataTable {
    width: 100% !important;
}

/* ==========================================
   ACTION BUTTONS
========================================== */
.icon-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    margin-right: 8px;
    font-size: 15px;
}

.icon-btn.edit {
    color: #2563eb;
}

.icon-btn.delete {
    color: #dc2626;
}

/* ==========================================
   STATUS SWITCH
========================================== */
.status-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
}

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

.status-switch .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.status-switch .slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.status-switch input:checked+.slider {
    background-color: #22c55e;
}

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

/* ================================
   MAPPING PAGE FINAL ALIGNMENT FIX
================================ */
.mapping-page-card {
    background: #ffffff !important;
    border-radius: 10px !important;
    padding: 25px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

.mapping-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 20px !important;
}

.mapping-header h2 {
    margin: 0 !important;
    font-size: 24px !important;
    font-weight: 600 !important;
}

.mapping-search-row {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 15px !important;
}

.mapping-search-input {
    width: 220px !important;
    min-width: 220px !important;
    height: 38px !important;
    padding: 0 10px !important;
    border: 1px solid #ccc !important;
    border-radius: 5px !important;
    font-size: 14px !important;
}

.mapping-btn {
    width: auto !important;
    min-width: unset !important;
    max-width: max-content !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 9px 16px !important;
    border: none !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
    font-size: 14px !important;
}

.mapping-btn-primary {
    background: #2563eb !important;
    color: #ffffff !important;
}

.mapping-btn-secondary {
    background: #e5e7eb !important;
    color: #111827 !important;
}

.dataTables_wrapper {
    width: 100% !important;
}

.dt-buttons {
    margin-bottom: 12px !important;
}

.dataTables_filter {
    margin-bottom: 12px !important;
}

table.dataTable {
    width: 100% !important;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1.8fr;
    gap: 30px;
    align-items: start;
}

.right-json textarea {
    width: 100%;
    min-height: 520px;
    resize: vertical;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: monospace;
}

@media (max-width: 900px) {
    .two-column {
        grid-template-columns: 1fr;
    }
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 28px;
    align-items: start;
}

.left-form {
    max-height: 650px;
    overflow-y: auto;
    padding-right: 10px;
}

.right-json textarea {
    width: 100%;
    min-height: 650px;
    resize: vertical;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: monospace;
    font-size: 13px;
}

@media (max-width: 900px) {
    .two-column {
        grid-template-columns: 1fr;
    }

    .left-form {
        max-height: none;
        overflow-y: visible;
    }
}

.dashboard-grid {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.dashboard-card {
    width: 240px;
    height: 170px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 25px;
    cursor: pointer;
    position: relative;
    transition: 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-4px);
}

.dashboard-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 18px;
    bottom: 18px;
    width: 6px;
    border-radius: 10px;
}

.dashboard-card.blue::before {
    background: #3b82f6;
}

.dashboard-card.green::before {
    background: #34a853;
}

.dashboard-card.yellow::before {
    background: #d6a300;
}

.dashboard-card.purple::before {
    background: #6c63ff;
}

.dashboard-card.red::before {
    background: #d9534f;
}

.card-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 26px;
}

.dashboard-card.blue .card-icon {
    background: #dbeafe;
    color: #3b82f6;
}

.dashboard-card.green .card-icon {
    background: #dcfce7;
    color: #34a853;
}

.dashboard-card.yellow .card-icon {
    background: #fef3c7;
    color: #d6a300;
}

.dashboard-card.purple .card-icon {
    background: #ede9fe;
    color: #6c63ff;
}

.dashboard-card.red .card-icon {
    background: #fde2e2;
    color: #d9534f;
}

.dashboard-card h3 {
    text-align: center;
    font-size: 16px;
    margin: 0;
    font-weight: 700;
}

.dashboard-card p {
    text-align: center;
    font-size: 13px;
    color: #777;
    margin-top: 8px;
}
