/* =====================================================================
   fc-sidemenu.css — "FC" style collapsible sidebar
   Chhota : html.fc-collapsed      -> 105px, icon upar + naam neeche, flyout
   Bara   : html.fc-collapsed nahi -> 230px, icon + naam, accordion
   ===================================================================== */
:root {
    --fc-w: 230px;
    --fc-w-mini: 105px;
    --fc-topbar-h: 50px;
    --fc-strip: 4px;                 /* upar wali orange patti */

    --fc-bg: #34495e;                /* sidebar */
    --fc-bg-dark: #2c3e50;           /* brand box / top bar / flyout */
    --fc-bg-hover: #2f4254;
    --fc-line: rgba(0, 0, 0, .18);   /* items ke beech lakeer */
    --fc-text: #ffffff;
    --fc-text-muted: #d5dde5;
    --fc-accent: #e74c3c;            /* active / hover laal */
    --fc-strip-color: #e67e22;
    --fc-speed: .2s;
}

body { margin: 0; }
.fc-sidebar, .fc-sidebar *, .fc-topbar, .fc-topbar * { box-sizing: border-box; }

/* ---------- Upar orange patti ---------- */
.fc-strip {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--fc-strip);
    background: var(--fc-strip-color);
    z-index: 1060;
}

/* ---------- Sidebar ---------- */
.fc-sidebar {
    position: fixed;
    top: var(--fc-strip); left: 0; bottom: 0;
    width: var(--fc-w);
    background: var(--fc-bg);
    color: var(--fc-text);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: width var(--fc-speed) ease, transform var(--fc-speed) ease;
}

.fc-main {
    margin-left: var(--fc-w);
    padding-top: var(--fc-strip);
    min-height: 100vh;
    background: #f1f3f6;
    transition: margin-left var(--fc-speed) ease;
}

/* ---------- Top bar (dark) ---------- */
.fc-topbar {
    position: sticky; top: var(--fc-strip);
    height: var(--fc-topbar-h);
    display: flex; align-items: stretch;
    background: var(--fc-bg);
    color: #fff;
    z-index: 1030;
}
.fc-topbar-btn {
    width: 50px;
    display: flex; align-items: center; justify-content: center;
    background: var(--fc-bg-dark);
    border: 0; border-right: 1px solid var(--fc-line);
    color: #fff; font-size: 17px; cursor: pointer;
}
.fc-topbar-btn:hover { background: #22313f; }
.fc-topbar-right {
    margin-left: auto;
    display: flex; align-items: center; gap: 12px;
    padding: 0 16px;
}

.fc-content { padding: 20px; }

/* ---------- Brand ---------- */
.fc-brand {
    height: var(--fc-topbar-h);
    flex: 0 0 auto;
    background: var(--fc-bg-dark);
    display: flex; align-items: center; justify-content: center;
}
.fc-brand-link {
    display: flex; align-items: baseline; gap: 8px;
    color: #fff; text-decoration: none; white-space: nowrap;
}
.fc-brand-short { font-size: 28px; font-weight: 700; letter-spacing: 1px; }
.fc-brand-text  { font-size: 15px; font-weight: 600; opacity: .85; }

/* ---------- Nav ---------- */
.fc-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
}
.fc-nav::-webkit-scrollbar { width: 5px; }
.fc-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }

.fc-list, .fc-sub { list-style: none; margin: 0; padding: 0; }
.fc-item { position: relative; border-bottom: 1px solid var(--fc-line); }

.fc-link {
    display: flex; align-items: center; gap: 14px;
    width: 100%;
    padding: 15px 18px;
    background: none; border: 0; cursor: pointer;
    color: var(--fc-text);
    font: inherit; font-size: 14px; font-weight: 500;
    text-align: left; text-decoration: none;
    transition: background .15s;
}
.fc-link:hover { background: var(--fc-bg-hover); color: #fff; }
.fc-link.active,
.fc-link.active:hover { background: var(--fc-accent); color: #fff; }

.fc-icon { width: 24px; flex: 0 0 24px; font-size: 19px; text-align: center; }
.fc-text { flex: 1 1 auto; white-space: nowrap; }
.fc-caret { font-size: 13px; opacity: .8; transition: transform var(--fc-speed); }
.fc-has-sub.open > .fc-group-btn .fc-caret { transform: rotate(90deg); }

/* ---------- Sub menu (bara menu = accordion) ---------- */
.fc-sub { display: none; background: var(--fc-bg-dark); }
.fc-has-sub.open > .fc-sub { display: block; }

.fc-sub-link {
    display: block;
    padding: 13px 18px 13px 56px;
    border-top: 1px solid var(--fc-line);
    color: var(--fc-text-muted);
    font-size: 14px; text-decoration: none; white-space: nowrap;
    transition: background .15s, color .15s;
}
.fc-sub-link:hover { background: var(--fc-bg-hover); color: #fff; }
.fc-sub-link.active { background: var(--fc-accent); color: #fff; }

/* ---------- Logout (sidebar ke neeche) ---------- */
.fc-logout-wrap { flex: 0 0 auto; padding: 12px; border-top: 1px solid var(--fc-line); }
.fc-logout {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 10px 12px; border-radius: 4px;
    background: #c0392b; color: #fff;
    font-size: 14px; font-weight: 500; text-decoration: none;
    transition: background .15s;
}
.fc-logout:hover { background: var(--fc-accent); color: #fff; }
.fc-logout .fc-icon { width: auto; flex: none; font-size: 16px; }
.fc-logout .fc-text { flex: none; }

/* =====================================================================
   CHHOTA MENU  (html.fc-collapsed) — picture jaisa
   ===================================================================== */
html.fc-collapsed .fc-sidebar { width: var(--fc-w-mini); }
html.fc-collapsed .fc-main    { margin-left: var(--fc-w-mini); }

html.fc-collapsed .fc-brand-text { display: none; }
html.fc-collapsed .fc-nav { overflow: visible; }

html.fc-collapsed .fc-link {
    flex-direction: column; justify-content: center; gap: 9px;
    min-height: 84px;
    padding: 12px 4px;
    text-align: center;
}
html.fc-collapsed .fc-icon  { font-size: 22px; width: auto; flex: none; }
html.fc-collapsed .fc-text  { flex: none; font-size: 13px; white-space: normal; line-height: 1.2; }
html.fc-collapsed .fc-caret { display: none; }
html.fc-collapsed .fc-logout-wrap { padding: 8px; }
html.fc-collapsed .fc-logout { flex-direction: column; gap: 4px; padding: 8px 4px; }
html.fc-collapsed .fc-logout .fc-text { font-size: 12px; }

/* accordion band — chhote menu mein sirf flyout */
html.fc-collapsed .fc-has-sub.open > .fc-sub { display: none; }

html.fc-collapsed .fc-has-sub > .fc-sub {
    position: absolute;
    left: 100%; top: 0;
    min-width: 195px;
    background: var(--fc-bg-dark);
    box-shadow: 4px 4px 14px rgba(0,0,0,.25);
    z-index: 1050;
}
/* chhota arrow jo item ki taraf ishara kare */
html.fc-collapsed .fc-has-sub > .fc-sub::before {
    content: "";
    position: absolute;
    left: -9px; top: 32px;
    border-style: solid;
    border-width: 9px 9px 9px 0;
    border-color: transparent var(--fc-bg-dark) transparent transparent;
}
html.fc-collapsed .fc-has-sub:hover > .fc-sub,
html.fc-collapsed .fc-has-sub.fly > .fc-sub { display: block; }

/* flyout khula ho to item ka rang wahi rahe, taake arrow saaf dikhe (picture jaisa) */
html.fc-collapsed .fc-has-sub:hover > .fc-link:not(.active),
html.fc-collapsed .fc-has-sub.fly > .fc-link:not(.active) { background: var(--fc-bg); }

html.fc-collapsed .fc-sub li:first-child .fc-sub-link { border-top: 0; }
html.fc-collapsed .fc-sub-link { padding: 15px 20px; }

/* =====================================================================
   MOBILE (< 992px): menu off-canvas, toggle se slide-in (hamesha bara)
   ===================================================================== */
.fc-backdrop { display: none; }

@media (max-width: 991.98px) {
    .fc-sidebar { transform: translateX(-100%); width: var(--fc-w); }
    .fc-main,
    html.fc-collapsed .fc-main { margin-left: 0; }

    html.fc-mobile-open .fc-sidebar { transform: translateX(0); }
    html.fc-mobile-open .fc-backdrop {
        display: block; position: fixed; inset: 0;
        background: rgba(0,0,0,.4); z-index: 1035;
    }

    /* mobile par chhota style lagu na ho */
    html.fc-collapsed .fc-sidebar { width: var(--fc-w); }
    html.fc-collapsed .fc-brand-text { display: inline; }
    html.fc-collapsed .fc-nav { overflow-y: auto; }
    html.fc-collapsed .fc-link {
        flex-direction: row; justify-content: flex-start; gap: 14px;
        min-height: 0; padding: 15px 18px; text-align: left;
    }
    html.fc-collapsed .fc-icon  { font-size: 19px; width: 24px; flex: 0 0 24px; }
    html.fc-collapsed .fc-text  { flex: 1 1 auto; font-size: 14px; white-space: nowrap; }
    html.fc-collapsed .fc-caret { display: inline-block; }
    html.fc-collapsed .fc-has-sub > .fc-sub {
        position: static; box-shadow: none; min-width: 0; display: none;
    }
    html.fc-collapsed .fc-has-sub > .fc-sub::before { display: none; }
    html.fc-collapsed .fc-has-sub.open > .fc-sub { display: block; }
    html.fc-collapsed .fc-has-sub:hover:not(.open) > .fc-sub { display: none; }
    html.fc-collapsed .fc-sub-link { padding: 13px 18px 13px 56px; }
    html.fc-collapsed .fc-logout-wrap { padding: 12px; }
    html.fc-collapsed .fc-logout { flex-direction: row; gap: 10px; padding: 10px 12px; }
    html.fc-collapsed .fc-logout .fc-text { font-size: 14px; }
}

/* ---------- Top bar: user ka naam / shop ---------- */
.fc-user { font-size: 14px; color: #fff; white-space: nowrap; }
.fc-user-shop { opacity: .75; margin-left: 4px; }
