﻿/* ================= GLOBAL ================= */

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    overflow-x: hidden;
    background-color: #f8f9fa;
}

a, .btn-link {
    color: #006bb7;
}

.page-title {
    font-weight: 600;
    margin-bottom: 20px;
}

.content-area {
    padding: 20px;
}

label {
    font-size: 13px;
    margin-bottom: 2px;
}

/* ================= LAYOUT ================= */

.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: #fff;
    padding: 10px 20px;
    border-bottom: 1px solid #eee;
}

/* ================= SIDEBAR ================= */

.sidebar-container {
    position: sticky;
    top: 0;
    width: 240px;
    height: 100vh;
    padding: 15px 10px;
    background: #0f172a;
    overflow-y: auto;
}

    .sidebar-container::-webkit-scrollbar {
        width: 5px;
    }

    .sidebar-container::-webkit-scrollbar-thumb {
        background: #2c3e50;
        border-radius: 10px;
    }

.nav-section {
    font-size: 13px;
    font-weight: 600;
    color: #aaa;
    margin: 18px 0 8px 12px;
    text-transform: uppercase;
}

.sidebar-link {
    color: #fff !important;
    padding: 12px 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.25s;
}

    .sidebar-link:hover {
        background: #1f1f1f;
        transform: translateX(5px);
    }

    .sidebar-link.active {
        background: #0d6efd !important;
    }

/* ================= BUTTONS ================= */

.btn {
    border-radius: 10px;
    transition: 0.2s;
}

    .btn:hover {
        transform: translateY(-1px);
    }

.btn-primary {
    background: #1b6ec2;
    border-color: #1861ac;
    box-shadow: 0 3px 8px rgba(13,110,253,0.3);
}

    .btn-primary:hover {
        box-shadow: 0 5px 14px rgba(13,110,253,0.4);
    }

.btn-equal {
    height: 45px;
    font-weight: 500;
}

/* ================= CARDS ================= */

.card {
    border: none;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    transition: 0.2s;
}

    .card:hover {
        transform: translateY(-3px);
    }

.dashboard-card::before {
    content: "";
    position: absolute;
    width: 6px;
    height: 100%;
    left: 0;
    top: 0;
}

.card-info::before {
    background: #0dcaf0;
}

.card-success::before {
    background: #198754;
}

.card-warning::before {
    background: #ffc107;
}

.card-danger::before {
    background: #dc3545;
}

/* ================= TABLE ================= */

.table th {
    font-weight: 600;
}

.table td {
    vertical-align: middle;
}

.table-responsive {
    overflow: visible !important;
}

.dropdown-menu {
    z-index: 9999 !important;
}

/* ================= STATUS ================= */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

    .status-badge .dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
    }

.status-in {
    background: #d4edda;
    color: #155724;
}

.status-out {
    background: #f8d7da;
    color: #721c24;
}

.status-break {
    background: #fff3cd;
    color: #856404;
}

.status-default {
    background: #e2e3e5;
    color: #383d41;
}

/* ================= TOAST ================= */

.toast-box {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 18px;
    border-radius: 12px;
    color: #fff;
    z-index: 9999;
}

.toast-success {
    background: #16a34a;
}

.toast-error {
    background: #dc2626;
}

.toast-warning {
    background: #f59e0b;
}

/* ================= UTIL ================= */

.text-nowrap {
    white-space: nowrap;
}

.used-row {
    background: #f5f5f5;
    opacity: 0.75;
}

/* ================= DASHBOARD ================= */

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.card-box {
    padding: 18px;
    border-radius: 12px;
    color: #fff;
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

    .card-box h3 {
        font-size: 26px;
        margin: 0;
    }

/* Colors */
.green {
    background: #22c55e;
}

.red {
    background: #ef4444;
}

.orange {
    background: #f59e0b;
}

.purple {
    background: #8b5cf6;
}

.blue {
    background: #3b82f6;
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {

    .layout-wrapper {
        flex-direction: column;
    }

    .sidebar-container {
        width: 100%;
        height: auto;
        position: relative;
    }

    .content-area {
        padding: 12px;
    }

    table {
        min-width: 600px;
    }

    .btn {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
}

.dropdown-item span {
    background-color: #ffe58f;
    padding: 0 2px;
}

.card.border-danger {
    border: 1px solid red !important;
}

.form-control {
    padding: 4px 6px;
    font-size: 14px;
}