/* ===== Global Reset ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'MyriadPro', sans-serif;
}
body, html {
    background: #f5f6fa;
    color: #1f2d3d;
    height: 100%;
}
a { text-decoration: none; color: inherit; }

/* ===== Fonts ===== */
@font-face {
    font-family: 'Majesty';
    src: url('assets/font/Majesty/majesty-Regular.woff2') format('woff2'),
         url('assets/font/Majesty/majesty-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'MyriadPro';
    src: url('assets/font/myriad-pro/MyriadPro-Regular.woff2') format('woff2'),
         url('assets/font/myriad-pro/MyriadPro-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* ===== Sidebar ===== */
.main-sidebar, aside.sidebar {
    width: 260px;
    background: #0d1f3c; /* Navy Blue */
    color: #fff;
    position: fixed;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    transition: all 0.3s ease;
    font-family: 'MyriadPro', sans-serif;
    z-index: 2000;
}
.sidebar-brand {
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.sidebar-brand a {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    font-family: 'Majesty', sans-serif;
}
.sidebar-menu {
    list-style: none;
    padding: 10px 0;
}
.sidebar-menu .menu-header {
    font-size: 12px;
    font-weight: 600;
    padding: 10px 20px;
    text-transform: uppercase;
    opacity: 0.7;
}
.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 6px;
    color: #fff;
    transition: 0.2s;
}
.sidebar-menu li a:hover,
.sidebar-menu li.active > a {
    background: #3b6f32; /* Green highlight */
}
.dropdown-menu {
    display: none;
    flex-direction: column;
    padding-left: 0;
}
.sidebar-menu li:hover .dropdown-menu {
    display: flex;
}
.dropdown-menu li a {
    padding: 10px 35px;
    font-size: 14px;
    background: #112b44;
    color: #b8d8b8;
    border-radius: 4px;
    transition: 0.2s;
}
.dropdown-menu li a:hover {
    background: #1a3a5a;
    color: #fff;
}

/* ===== Topbar ===== */
.topbar {
    background: #fff;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.topbar .left { display: flex; align-items: center; gap: 15px; }
.topbar .left button { display: none; background:none; border:none; font-size:22px; cursor:pointer; color:#1f2d3d; }
.search h3 { font-family: 'Majesty', sans-serif; font-size: 22px; }
.topbar .actions { display: flex; align-items: center; gap: 15px; }
.profile-dropdown { position: relative; }
.profile-dropdown button {
    display: flex; align-items: center; gap: 8px;
    border: none; background: none; cursor: pointer;
}
.profile-dropdown-menu {
    display: none;
    position: absolute; right: 0; top: 50px;
    background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,0.1);
    border-radius: 8px; overflow: hidden; min-width: 160px;
}
.profile-dropdown-menu a {
    display: block;
    padding: 10px 15px;
    color: #1f2d3d;
    font-size: 14px;
}
.profile-dropdown-menu a:hover {
    background: #e0e5ea;
}
.profile-dropdown.active .profile-dropdown-menu { display: block; }

/* ===== Main content ===== */
.main-wrapper {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}
.main-wrapper.full { margin-left: 0; }
main.main-content { padding: 20px; flex: 1; overflow-y: auto; }

/* ===== Dashboard Cards ===== */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
    gap: 20px;
}
.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
    transition: 0.3s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 6px 20px rgba(0,0,0,0.08); }
.card-title { font-size: 14px; color: #6b7280; margin-bottom: 5px; font-family: 'Majesty', sans-serif; }
.card-value { font-size: 22px; font-weight: 700; font-family: 'Majesty', sans-serif; }
.card-icon { font-size: 28px; padding: 12px; border-radius: 8px; background: #1b365d; color: #fff; }

/* ===== Loader ===== */
#book-loader {
    position: fixed;
    inset: 0;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}
.loader-label { margin-top: 18px; font-size: 22px; font-weight: 700; color: #1b365d; }

/* ===== System Lock Overlay ===== */
.system-lock-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%; height: 100%;
    background: rgba(255,255,255,0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lock-box {
    background: #ffffff;
    padding: 30px 40px;
    border-radius: 8px;
    text-align: center;
    max-width: 420px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.lock-box h3 { margin-bottom: 10px; color: #c0392b; }
.lock-box p { font-size: 15px; color: #333; }

/* ===== Responsive ===== */
@media(max-width:992px){
    .topbar .left button { display:block; }
    .main-wrapper { margin-left:0; }
    .main-sidebar { transform: translateX(-100%); z-index:2000; }
    .main-sidebar.show { transform: translateX(0); }
}
@media(max-width:768px){
    .close-sidebar { display:block; position:absolute; top:10px; right:10px; width:35px; height:35px; background:#ff4d4f; border:none; border-radius:50%; font-size:24px; color:#fff; cursor:pointer; z-index:1000; }
}
