/* ==========================================================

   BARBER KIOS MANAGEMENT

   ADMIN DASHBOARD STYLESHEET

   Laravel 11 - Blade

========================================================== */



/* ==========================================================

   1. VARIABLES & RESET

========================================================== */



:root {

    --sidebar: #142638;

    --sidebar-hover: #233a4e;

    --primary: #177b58;

    --primary-dark: #126448;

    --background: #f3f6fa;

    --surface: #ffffff;

    --text: #1c2938;

    --muted: #718096;

    --border: #e5eaf0;

    --danger: #dc3545;

    --success: #198754;

    --warning: #d17e1c;



    --radius: 12px;

    --shadow: 0 3px 12px rgba(26, 42, 65, 0.05);

}



* {

    box-sizing: border-box;

}



html {

    scroll-behavior: smooth;

}



body {

    margin: 0;

    font-family: Inter, Arial, sans-serif;

    background: var(--background);

    color: var(--text);

    line-height: 1.5;

}



button,

input,

select,

textarea {

    font: inherit;

}



a {

    text-decoration: none;

}



button {

    cursor: pointer;

}



/* ==========================================================

   2. MAIN LAYOUT

========================================================== */



.app-layout {

    display: flex;

    min-height: 100vh;

}



.main-wrapper {

    flex: 1;

    min-width: 0;

}



.page-content {

    padding: 28px;

    max-width: 1600px;

    margin: auto;

}



/* ==========================================================

   3. SIDEBAR

========================================================== */



/* ==========================================================
   3. SIDEBAR - CONSOLIDATED
========================================================== */

.sidebar {
    width: 255px;
    min-width: 255px;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--sidebar);
    color: #fff;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 18px;
    border-bottom: 1px solid #314456;
    flex-shrink: 0;
}

.brand-icon {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: 12px;
    font-size: 24px;
}

.sidebar-brand strong {
    font-size: 15px;
}

.sidebar-brand small {
    display: block;
    color: #b8c7d5;
    font-size: 11px;
    margin-top: 5px;
}

.sidebar-menu {
    display: block;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 12px 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .2) transparent;
}

.sidebar-menu .sidebar-group {
    margin: 0 0 18px;
}

.sidebar-menu .sidebar-group:last-child {
    margin-bottom: 0;
}

.sidebar-menu .sidebar-label,
.sidebar-menu .sidebar-group .sidebar-label {
    display: block;
    margin: 0 0 7px;
    padding: 0 12px;
    color: #9bb0c4;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.1px;
    line-height: 22px;
    text-transform: uppercase;
}

.sidebar-menu .menu-item {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    column-gap: 12px;
    min-height: 42px;
    margin: 2px 0;
    padding: 10px 12px;
    border-left: 0;
    border-radius: 9px;
    color: #bdcbd7;
    font-size: 13px;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}

/* IMPORTANT: target icon only, not every .menu-item span */
.sidebar-menu .menu-item .menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    min-width: 0;
    margin: 0;
    padding: 0;
    font-size: 18px;
    line-height: 1;
    text-align: center;
}

.sidebar-menu .menu-item .menu-text {
    display: block;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 20px;
    overflow-wrap: anywhere;
}

.sidebar-menu .menu-item:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar-menu .menu-item.active {
    background: rgba(34, 197, 94, .15);
    color: #4ade80;
}

.sidebar-menu .menu-item.active .menu-icon,
.sidebar-menu .menu-item.active .menu-text {
    color: inherit;
}

.sidebar-footer {
    flex-shrink: 0;
    padding: 15px;
    border-top: 1px solid #314456;
}

.logout-button {
    width: 100%;
    padding: 12px;
    border: 1px solid #617080;
    color: #fff;
    background: transparent;
    border-radius: 8px;
    transition: background-color .2s ease;
}

.logout-button:hover {
    background: #a43838;
}

.sidebar-menu::-webkit-scrollbar {
    width: 5px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .18);
    border-radius: 10px;
}

/* ==========================================================

   4. NAVBAR / TOPBAR

========================================================== */



.topbar {

    background: var(--surface);

    border-bottom: 1px solid var(--border);

    min-height: 85px;

    padding: 16px 30px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

}



.topbar-left,

.topbar-right {

    display: flex;

    align-items: center;

    gap: 14px;

}



.topbar h2 {

    font-size: 20px;

    margin: 0;

}



.topbar p {

    font-size: 12px;

    color: var(--muted);

    margin: 5px 0 0;

}



.today,

.owner-name {

    font-size: 13px;

}



.avatar {

    width: 36px;

    height: 36px;

    border-radius: 50%;

    background: #e1f5ea;

    color: var(--primary);

    display: grid;

    place-items: center;

    font-weight: bold;

    flex-shrink: 0;

}



.menu-toggle {

    display: none;

    background: none;

    border: 0;

    font-size: 24px;

    cursor: pointer;

}



/* ==========================================================

   5. PAGE HEADING

========================================================== */



.page-heading {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    margin-bottom: 24px;

}



.page-heading h1 {

    margin: 0 0 6px;

    font-size: 24px;

}



.page-heading p {

    margin: 0;

    color: var(--muted);

    font-size: 13px;

}



/* ==========================================================

   6. DASHBOARD STATISTICS

========================================================== */



.stats-grid {

    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 18px;

    margin-bottom: 25px;

}



.stat-card,

.panel {

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 14px;

    box-shadow: var(--shadow);

}



.stat-card {

    padding: 22px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

}



.stat-info {

    min-width: 0;

}



.stat-info p {

    margin: 0 0 10px;

    color: var(--muted);

    font-size: 13px;

}



.stat-info h3 {

    margin: 0;

    font-size: clamp(18px, 2vw, 25px);

    overflow-wrap: anywhere;

}



.stat-icon {

    width: 48px;

    height: 48px;

    border-radius: 12px;

    display: grid;

    place-items: center;

    background: #e0f4eb;

    color: var(--primary);

    font-size: 19px;

    font-weight: 700;

    flex-shrink: 0;

}



.stat-icon.blue {

    background: #e5efff;

    color: #2874c7;

}



.stat-icon.orange {

    background: #fff1dc;

    color: #d17e1c;

}



.stat-icon.red {

    background: #fee8e8;

    color: #cb3b3b;

}



/* ==========================================================

   7. PANELS / CARDS

========================================================== */



.panel {

    padding: 22px;

    margin-bottom: 24px;

}



.panel h3 {

    margin: 0 0 18px;

    font-size: 18px;

}



/* ==========================================================

   8. TABLES

========================================================== */



.table-responsive {

    width: 100%;

    overflow-x: auto;

    -webkit-overflow-scrolling: touch;

}



.data-table {

    width: 100%;

    border-collapse: collapse;

    min-width: 600px;

}



.data-table th {

    text-align: left;

    font-size: 12px;

    color: #526275;

    background: #f5f8fb;

    padding: 14px;

    white-space: nowrap;

}



.data-table td {

    padding: 14px;

    border-bottom: 1px solid var(--border);

    font-size: 13px;

    vertical-align: middle;

}



.data-table tbody tr:hover {

    background: #f9fbfd;

}



.data-table tr:last-child td {

    border-bottom: 0;

}



.data-table td strong {

    color: #25364b;

}



.data-table td a {

    white-space: nowrap;

}



.empty-state {

    text-align: center;

    padding: 30px;

    color: var(--muted);

}



/* ==========================================================

   9. BADGES / STATUS

========================================================== */



.badge {

    display: inline-block;

    padding: 6px 10px;

    border-radius: 20px;

    font-size: 12px;

    font-weight: 600;

    background: #eaf0f5;

}



.badge.pending {

    background: #fff0ce;

    color: #a3660f;

}



.badge.approved,

.badge.verified {

    background: #ddf6e9;

    color: #167449;

}



.badge.rejected {

    background: #ffe1e1;

    color: #ac2828;

}



.badge.purchased {

    background: #dceaff;

    color: #2867b5;

}



/* ==========================================================

   10. BUTTONS

========================================================== */



.btn {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 6px;

    border: 1px solid transparent;

    border-radius: 8px;

    padding: 10px 14px;

    background: var(--primary);

    color: #ffffff;

    cursor: pointer;

    font-size: 13px;

    font-weight: 600;

    text-align: center;

    transition: background-color 0.2s;

}



.btn:hover {

    background: var(--primary-dark);

    color: #ffffff;

}



.btn-danger {

    background: var(--danger);

    color: #ffffff;

}



.btn-danger:hover {

    background: #b52c3b;

}



.btn-outline {

    color: var(--primary);

    border: 1px solid var(--primary);

    background: #ffffff;

}



.btn-outline:hover {

    color: #ffffff;

    background: var(--primary);

}



.btn:disabled {

    opacity: 0.5;

    cursor: not-allowed;

}



.actions {

    display: flex;

    gap: 8px;

    flex-wrap: wrap;

}



/* ==========================================================

   11. ALERTS

========================================================== */



.alert {

    padding: 14px;

    border-radius: 9px;

    margin-bottom: 20px;

    font-size: 14px;

}



.alert-success {

    background: #def7e9;

    color: #176445;

}



.alert-error {

    background: #ffe6e6;

    color: #9b2424;

}



/* ==========================================================

   12. FORMS & FILTERS

========================================================== */



.filter-form {

    display: flex;

    align-items: flex-end;

    gap: 12px;

    flex-wrap: wrap;

}



.form-group {

    display: flex;

    flex-direction: column;

    gap: 7px;

}



.form-group label {

    font-size: 12px;

    color: var(--muted);

}



.form-control {

    width: 100%;

    min-height: 42px;

    padding: 10px 12px;

    border: 1px solid var(--border);

    border-radius: 8px;

    background: #ffffff;

    color: var(--text);

}



.form-control:focus {

    outline: none;

    border-color: var(--primary);

    box-shadow: 0 0 0 3px rgba(23, 123, 88, 0.12);

}



textarea.form-control {

    resize: vertical;

    line-height: 1.5;

}



.help-text {

    display: block;

    color: var(--muted);

    font-size: 12px;

    line-height: 1.5;

    margin-top: 4px;

}



.field-error {

    color: var(--danger);

    font-size: 12px;

}



/* ==========================================================

   13. BRANCH & BARBER MANAGEMENT

========================================================== */



.branch-form-grid {

    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 20px;

}



.branch-form-grid .full-width {

    grid-column: 1 / -1;

}



.form-actions {

    display: flex;

    justify-content: flex-end;

    gap: 12px;

    margin-top: 25px;

}



.branch-details {

    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 20px;

    margin-bottom: 25px;

}



.branch-details small {

    color: var(--muted);

    font-size: 12px;

}



.branch-details p {

    font-size: 14px;

    font-weight: 600;

    margin: 7px 0 0;

    overflow-wrap: anywhere;

}



/* ==========================================================

   14. CUSTOM PAGINATION

   Used by vendor.pagination.custom

========================================================== */



.kios-pagination {

    display: flex;

    align-items: center;

    justify-content: space-between;

    flex-wrap: wrap;

    gap: 16px;

    padding: 20px 0;

    margin-top: 15px;

    border-top: 1px solid var(--border);

}



.kios-pagination-info {

    font-size: 13px;

    color: #64748b;

}



.kios-pagination-info strong {

    color: #0f172a;

    font-weight: 600;

}



.kios-pagination-list {

    display: flex;

    flex-direction: row;

    align-items: center;

    justify-content: flex-end;

    flex-wrap: wrap;

    gap: 6px;

    list-style: none;

    margin: 0;

    padding: 0;

}



.kios-pagination-list li {

    list-style: none;

    margin: 0;

    padding: 0;

}



.kios-page-btn {

    display: inline-flex;

    justify-content: center;

    align-items: center;

    min-width: 38px;

    height: 38px;

    padding: 0 12px;

    color: #334155;

    background: #ffffff;

    border: 1px solid #e2e8f0;

    border-radius: 8px;

    font-size: 13px;

    font-weight: 600;

    text-decoration: none;

    transition: background-color 0.2s, border-color 0.2s;

}



a.kios-page-btn:hover {

    background: #e9f7f0;

    color: var(--primary);

    border-color: var(--primary);

}



.kios-page-btn.active {

    background: var(--primary);

    border-color: var(--primary);

    color: #ffffff;

}



.kios-page-btn.disabled {

    background: #f8fafc;

    color: #94a3b8;

    cursor: default;

}



/* ==========================================================

   15. RESPONSIVE - TABLETS

========================================================== */



@media (max-width: 1100px) {

    .stats-grid {

        grid-template-columns: repeat(2, minmax(0, 1fr));

    }

}



/* ==========================================================

   16. RESPONSIVE - MOBILE

========================================================== */



@media (max-width: 768px) {



    .sidebar {

        position: fixed;

        left: -255px;

        top: 0;

        height: 100dvh;

        transition: left 0.2s;

    }



    .sidebar.open {

        left: 0;

        box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.25);

    }



    .menu-toggle {

        display: block;

    }



    .topbar {

        padding: 15px;

        min-height: 70px;

    }



    .topbar h2 {

        font-size: 17px;

    }



    .page-content {

        padding: 16px;

    }



    .today,

    .owner-name {

        display: none;

    }



    .page-heading {

        align-items: flex-start;

        flex-direction: column;

    }



    .page-heading h1 {

        font-size: 21px;

    }



    .stats-grid {

        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 10px;

    }



    .stat-card {

        padding: 15px;

    }



    .stat-icon {

        display: none;

    }



    .stat-info h3 {

        font-size: 18px;

    }



    .panel {

        padding: 15px;

    }



    .branch-form-grid,

    .branch-details {

        grid-template-columns: 1fr;

    }



    .form-actions {

        flex-wrap: wrap;

    }



    .filter-form {

        flex-direction: column;

        align-items: stretch;

    }



    .filter-form .form-group,

    .filter-form .btn {

        width: 100%;

    }



    .kios-pagination {

        flex-direction: column;

        align-items: center;

        gap: 12px;

    }



    .kios-pagination-info {

        text-align: center;

    }



    .kios-pagination-list {

        justify-content: center;

    }



    .kios-page-btn {

        min-width: 34px;

        height: 34px;

        padding: 0 9px;

    }

}



/* ==========================================================

   17. SMALL MOBILE

========================================================== */



@media (max-width: 400px) {



    .stats-grid {

        grid-template-columns: 1fr;

    }



    .topbar p {

        display: none;

    }



    .page-content {

        padding: 12px;

    }



}



/* ================================

   TOPBAR NOTIFICATION - FINAL

================================ */



.topbar {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    overflow: visible;

}



.topbar-right {

    display: flex;

    align-items: center;

    gap: 16px;

    flex-shrink: 0;

}



.notification-wrapper {

    position: relative;

    display: inline-flex;

    align-items: center;

}



.notification-trigger {

    position: relative;

    display: flex;

    align-items: center;

    justify-content: center;

    width: 42px;

    height: 42px;

    padding: 0;

    border: 1px solid #e2e8f0;

    border-radius: 12px;

    background: #f8fafc;

    color: #142638;

    cursor: pointer;

    transition: 0.2s ease;

}



.notification-trigger:hover {

    background: #e8f5ed;

    border-color: #177b58;

    color: #177b58;

}



.notification-count {

    position: absolute;

    top: -6px;

    right: -6px;

    min-width: 20px;

    height: 20px;

    padding: 0 5px;

    border-radius: 100px;

    background: #ef4444;

    border: 2px solid white;

    color: white;

    font-size: 10px;

    font-weight: 800;

    display: flex;

    align-items: center;

    justify-content: center;

}



.notification-dropdown {

    position: absolute;

    top: calc(100% + 14px);

    right: 0;

    width: 360px;

    max-width: calc(100vw - 24px);

    max-height: 480px;

    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 16px;

    box-shadow: 0 16px 45px rgba(15, 23, 42, 0.16);

    z-index: 10000;

    overflow: hidden;

}



.notification-dropdown[hidden] {

    display: none !important;

}



.notification-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    padding: 17px 18px;

    border-bottom: 1px solid #edf0f4;

}



.notification-header strong {

    color: #142638;

    font-size: 16px;

    font-weight: 800;

}



.notification-header span {

    color: #64748b;

    font-size: 12px;

    white-space: nowrap;

}



.notification-list {

    max-height: 330px;

    overflow-y: auto;

}



.notification-list form {

    margin: 0;

}



.notification-item {

    width: 100%;

    display: flex;

    flex-direction: column;

    align-items: flex-start;

    gap: 7px;

    padding: 15px 18px;

    background: white;

    border: 0;

    border-bottom: 1px solid #f1f5f9;

    text-align: left;

    cursor: pointer;

}



.notification-item.unread {

    background: #edf9f2;

}



.notification-item:hover {

    background: #f1f5f9;

}



.notification-item strong {

    color: #142638;

    font-size: 13px;

    font-weight: 800;

}



.notification-item span {

    color: #475569;

    font-size: 12px;

    line-height: 1.6;

}



.notification-item small {

    color: #94a3b8;

    font-size: 11px;

}



.notification-empty {

    padding: 35px 16px;

    color: #94a3b8;

    font-size: 13px;

    text-align: center;

}



.notification-footer {

    display: block;

    padding: 14px;

    color: #177b58;

    background: white;

    border-top: 1px solid #edf0f4;

    font-size: 12px;

    font-weight: 800;

    text-decoration: none;

    text-align: center;

}



.notification-footer:hover {

    background: #f0fdf4;

}



@media (max-width: 768px) {

    .topbar-right {

        gap: 10px;

    }



    .topbar-right .today {

        display: none;

    }



    .notification-dropdown {

        width: min(350px, calc(100vw - 24px));

    }

}





/* ==========================================

   SIDEBAR - MENU GROUPS

========================================== */



.sidebar {

    display: flex;

    flex-direction: column;

    height: 100vh;

    overflow: hidden;

}



.sidebar-brand {

    display: flex;

    align-items: center;

    gap: 12px;

    flex-shrink: 0;

}



/* Area menu bisa di-scroll */

.sidebar-menu {

    flex: 1;

    min-height: 0;

    overflow-y: auto;

    overflow-x: hidden;

    padding: 12px 10px 22px;

    scrollbar-width: thin;

    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;

}



/* Setiap kelompok memiliki jarak konsisten */

.sidebar-group {

    margin-bottom: 22px;

}



.sidebar-group:last-child {

    margin-bottom: 0;

}



/* Label kategori */

.sidebar-menu .sidebar-label {

    display: block;

    padding: 0 12px;

    margin: 0 0 9px;

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 1.4px;

    line-height: 18px;

    text-transform: uppercase;

    color: #94a3b8;

}



/* Item menu */

.sidebar-menu .menu-item {

    display: flex;

    align-items: center;

    gap: 12px;

    min-height: 43px;

    margin: 3px 0;

    padding: 10px 12px;

    border-radius: 10px;

    text-decoration: none;

    box-sizing: border-box;

    transition:

        background-color 0.2s ease,

        color 0.2s ease;

}



/* Ikon punya lebar sama */

.sidebar-menu .menu-icon {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    width: 22px;

    min-width: 22px;

    font-size: 18px;

    line-height: 1;

    text-align: center;

}



/* Nama menu */

.sidebar-menu .menu-text {

    flex: 1;

    min-width: 0;

    font-size: 13px;

    font-weight: 500;

    line-height: 1.4;

}



/* Menu aktif */

.sidebar-menu .menu-item.active {

    background: rgba(34, 197, 94, 0.15);

    color: #4ade80;

    font-weight: 700;

}



/* Footer tetap di bawah */

.sidebar-footer {

    flex-shrink: 0;

    padding: 15px;

    border-top: 1px solid rgba(255, 255, 255, 0.08);

}



/* Scrollbar */

.sidebar-menu::-webkit-scrollbar {

    width: 5px;

}



.sidebar-menu::-webkit-scrollbar-thumb {

    background: rgba(255, 255, 255, 0.18);

    border-radius: 10px;

}
