/* =========================================
   Custom Auth Pages Styling
   ========================================= */

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f4f7fe;
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    display: flex;
    width: 100%;
    max-width: 950px;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.auth-image {
    flex: 1;
    background-size: cover;
    background-position: center;
    min-height: 500px;
    display: none;
}

@media (min-width: 768px) {
    .auth-image {
        display: block;
    }
}

.auth-form-side {
    flex: 1;
    padding: 48px 40px;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.auth-logo img {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
}

.auth-logo span {
    font-weight: 700;
    font-size: 20px;
    color: #1c2b45;
}

.auth-title {
    font-size: 26px;
    font-weight: 700;
    color: #1c2b45;
    margin-bottom: 6px;
}

.auth-subtitle {
    color: #7c8aa5;
    margin-bottom: 28px;
    font-size: 14px;
}

.form-label {
    font-weight: 600;
    font-size: 14px;
    color: #344054;
}

.input-icon-wrap {
    position: relative;
}

.input-icon-wrap i {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: #97a3b6;
}

.input-icon-wrap .toggle-password {
    left: auto;
    right: 14px;
    cursor: pointer;
}

.input-icon-wrap input {
    padding-left: 40px;
    padding-right: 40px;
    height: 46px;
    border-radius: 8px;
    border: 1px solid #e3e8f0;
}

.input-icon-wrap input:focus {
    border-color: #2f80ed;
    box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.12);
}

.btn-auth {
    height: 46px;
    border-radius: 8px;
    background: #2f80ed;
    border: none;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.btn-auth:hover {
    background: #1c66cf;
}

.auth-footer-link {
    text-align: center;
    margin-top: 22px;
    font-size: 14px;
    color: #7c8aa5;
}

.auth-footer-link a {
    color: #2f80ed;
    font-weight: 600;
    text-decoration: none;
}

.alert-custom {
    border-radius: 8px;
    font-size: 14px;
}

.password-strength {
    height: 4px;
    border-radius: 2px;
    margin-top: 6px;
    background: #e3e8f0;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background 0.3s ease;
}

/* =========================================
   Dashboard Layout: Sidebar + Topbar
   ========================================= */

:root {
    --sidebar-width: 260px;
    --topbar-height: 64px;
}

body.dashboard-body {
    background: #f4f7fe;
}

/* ---- Sidebar ---- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: #1c2b45;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.25s ease;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
}

.sidebar-logo span {
    color: #fff;
    font-weight: 700;
    font-size: 17px;
}

.sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 12px 10px 40px;
}

.sidebar-nav > li {
    margin-bottom: 2px;
}

.sidebar-nav > li > a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #b8c2d9;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.sidebar-nav > li > a i:first-child {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

.sidebar-nav > li > a .arrow {
    margin-left: auto;
    font-size: 10px;
    transition: transform 0.2s ease;
}

.sidebar-nav > li > a[aria-expanded="true"] .arrow {
    transform: rotate(180deg);
}

.sidebar-nav > li > a:hover,
.sidebar-nav > li.active > a {
    background: #2f80ed;
    color: #fff;
}

.sidebar-nav .submenu {
    list-style: none;
    padding-left: 42px;
    margin-top: 2px;
}

.sidebar-nav .submenu li {
    margin-bottom: 1px;
}

.sidebar-nav .submenu li a {
    display: block;
    padding: 8px 10px;
    color: #93a0ba;
    text-decoration: none;
    font-size: 13.5px;
    border-radius: 6px;
}

.sidebar-nav .submenu li a:hover,
.sidebar-nav .submenu li.active a {
    color: #fff;
    background: rgba(255,255,255,0.06);
}

/* ---- Topbar ---- */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid #e9edf5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 900;
    transition: left 0.25s ease;
}

.sidebar-toggle-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #344054;
    cursor: pointer;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #1c2b45;
    font-weight: 600;
    font-size: 14px;
}

.topbar-user img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

/* ---- Main Content ---- */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: calc(var(--topbar-height) + 24px);
    padding-left: 24px;
    padding-right: 24px;
    padding-bottom: 40px;
    min-height: 100vh;
    transition: margin-left 0.25s ease;
}

/* ---- Collapsed state (toggle button) ---- */
body.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
}

body.sidebar-collapsed .topbar {
    left: 0;
}

body.sidebar-collapsed .main-content {
    margin-left: 0;
}

@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .topbar {
        left: 0;
    }
    .main-content {
        margin-left: 0;
    }
    body.sidebar-collapsed .sidebar {
        transform: translateX(0);
    }
}

/* =========================================
   Form Card Utility Classes (used in Add/Edit forms)
   ========================================= */
.shadow-1 {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.radius-12 {
    border-radius: 12px;
}

.bg-base {
    background: #ffffff;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #eef1f6;
}

.text-danger-600, .text-danger {
    color: #e03131 !important;
}

.form-label {
    font-weight: 600;
    font-size: 13.5px;
    color: #344054;
    margin-bottom: 6px;
    display: inline-block;
}

.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #e3e8f0;
    font-size: 14px;
}

.form-control:focus,
.form-select:focus {
    border-color: #2f80ed;
    box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.12);
}
