/* ============================================================
   Shell enhancements: sidebar menu + login page
   Loaded after main.css; uses logical properties for RTL/LTR.
   ============================================================ */

/* ===================== SIDEBAR ===================== */
.app-sidebar {
    width: 244px;
    padding: 16px 12px;
    gap: 3px;
    background: #ffffff;
    border-inline-end: 1px solid #eef2f7;
}
.app-sidebar::-webkit-scrollbar { width: 6px; }
.app-sidebar::-webkit-scrollbar-thumb { background: #d8e1ea; border-radius: 10px; }
.app-sidebar::-webkit-scrollbar-track { background: transparent; }

/* unified item style (links + group buttons) */
.app-sidebar .item {
    width: 100%;
    padding: 11px 14px;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    color: #67768c;
    text-align: start;
    border-radius: 10px;
    transition: background-color .2s ease, color .2s ease;
}
.app-sidebar .item i,
.app-sidebar .item svg {
    font-size: 16px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}
.app-sidebar .item:hover {
    background: #f1f6fb;
    color: #01b3e4;
}
.app-sidebar .item.active {
    color: #fff;
    font-weight: 700;
    background: #01b3e4;
    box-shadow: 0 6px 14px rgba(1, 179, 228, .32);
}

/* collapsible group header */
.app-sidebar button.item {
    position: relative;
    justify-content: flex-start;
    cursor: pointer;
}
.app-sidebar .menu-arrow {
    margin-inline-start: auto;
    width: auto !important;
    font-size: 12px !important;
    color: inherit;
    transition: transform .25s ease;
    opacity: .8;
}
.app-sidebar button.item[aria-expanded="true"] {
    color: #01b3e4;
    background: #f1f6fb;
}
.app-sidebar button.item[aria-expanded="true"] .menu-arrow {
    transform: rotate(180deg);
}

/* sub-items: same look, indented with a connector line */
.app-sidebar .child-items {
    position: relative;
    gap: 2px;
    margin: 3px 0 6px;
    padding-inline-start: 28px;
}
.app-sidebar .child-items::before {
    content: "";
    position: absolute;
    inset-block: 4px;
    inset-inline-start: 20px;
    width: 2px;
    border-radius: 2px;
    background: #e7eef6;
}
.app-sidebar .child-items .item {
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 500;
    gap: 10px;
    color: #7c8aa0;
}
.app-sidebar .child-items .item i,
.app-sidebar .child-items .item svg {
    font-size: 13px;
    width: 16px;
}
.app-sidebar .child-items .item:hover { background: #f1f6fb; color: #01b3e4; }
.app-sidebar .child-items .item.active {
    color: #fff;
    background: #01b3e4;
    box-shadow: 0 4px 10px rgba(1, 179, 228, .28);
}

/* keep content offset aligned with the slightly wider sidebar */
.app-content { padding-inline-start: 244px; }
@media (max-width: 991.98px) { .app-content { padding-inline-start: 0; } }

/* ===================== LOGIN PAGE ===================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(1200px 600px at 50% -10%, #e8f7fd 0%, #f4f8fb 55%, #eef3f8 100%);
    position: relative;
}
.auth-lang {
    position: absolute;
    inset-block-start: 22px;
    inset-inline-end: 24px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    background: #fff;
    border: 1px solid #e6edf3;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(16, 42, 67, .05);
    transition: all .2s ease;
}
.auth-lang:hover { color: #fff; background: #01b3e4; border-color: #01b3e4; }

.auth-card {
    width: 100%;
    max-width: 430px;
    background: #fff;
    border-radius: 18px;
    padding: 40px 34px 28px;
    box-shadow: 0 24px 60px -18px rgba(16, 42, 67, .22), 0 2px 8px rgba(16, 42, 67, .04);
    border: 1px solid #eef2f7;
    text-align: center;
    animation: authIn .5s cubic-bezier(.16, 1, .3, 1);
}
@keyframes authIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-brand {
    width: 92px;
    height: 92px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eaf8fd, #d4f0fa);
    border-radius: 22px;
    box-shadow: inset 0 0 0 1px rgba(1, 179, 228, .15);
}
.auth-brand img { width: 60px; height: auto; object-fit: contain; }

.auth-title { font-size: 22px; font-weight: 800; color: #1f2a3a; margin: 0 0 6px; }
.auth-sub   { font-size: 14px; color: #8a98ac; margin: 0 0 26px; }

.auth-form { text-align: start; }
.auth-field {
    position: relative;
    margin-bottom: 16px;
}
.auth-field i {
    position: absolute;
    inset-inline-start: 16px;
    inset-block-start: 50%;
    transform: translateY(-50%);
    color: #aab6c6;
    font-size: 15px;
    transition: color .2s ease;
    pointer-events: none;
}
.auth-field input {
    width: 100%;
    height: 52px;
    padding-inline: 46px 16px;
    font-size: 14px;
    color: #1f2a3a;
    background: #f7fafc;
    border: 1.5px solid #e6edf3;
    border-radius: 12px;
    outline: none;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.auth-field input::placeholder { color: #aab6c6; }
.auth-field input:focus {
    background: #fff;
    border-color: #01b3e4;
    box-shadow: 0 0 0 4px rgba(1, 179, 228, .12);
}
.auth-field input:focus + i,
.auth-field:focus-within i { color: #01b3e4; }

.auth-btn {
    width: 100%;
    height: 52px;
    margin-top: 6px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #01b3e4, #029ccc);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
    box-shadow: 0 10px 22px -8px rgba(1, 179, 228, .6);
}
.auth-btn:hover { filter: brightness(1.05); box-shadow: 0 14px 26px -8px rgba(1, 179, 228, .7); }
.auth-btn:active { transform: translateY(1px); }

.auth-alert {
    display: flex;
    align-items: center;
    gap: 9px;
    text-align: start;
    padding: 11px 14px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #b4232a;
    background: #fdecec;
    border: 1px solid #f6d4d4;
    border-radius: 10px;
}
.auth-alert i { color: #e0565c; }

.auth-footer {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid #f0f3f7;
    font-size: 12px;
    color: #9aa7b8;
}
.auth-credit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #9aa7b8;
    transition: color .2s ease;
}
.auth-credit:hover { color: #01b3e4; }
.auth-credit-logo { height: 22px; width: auto; object-fit: contain; }

@media (max-width: 480px) {
    .auth-card { padding: 32px 22px 24px; border-radius: 16px; }
    .auth-brand { width: 80px; height: 80px; }
}
