/* ============================================
   Hệ thống chấm công - Base styles
   Tách từ style.css để dùng cho layout mới
   ============================================ */

:root {
    --app-primary: #667eea;
    --app-secondary: #764ba2;
    --app-success: #28a745;
    --app-radius: 12px;
}

body {
    background: #f5f7fa;
    min-height: 100vh;
    scroll-behavior: smooth;
}

.navbar.bg-primary {
    background: linear-gradient(135deg, var(--app-primary) 0%, var(--app-secondary) 100%) !important;
}

.card-hover {
    transition: all 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

.progress {
    border-radius: 50px;
    overflow: hidden;
}

.progress-bar {
    font-weight: 600;
    font-size: 0.85rem;
}

.form-control,
.form-select {
    border-radius: var(--app-radius);
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.modal-content {
    border-radius: var(--app-radius);
    border: none;
}

.modal-header {
    background: #f8f9fa;
    border-radius: var(--app-radius) var(--app-radius) 0 0;
}

.nav-tabs .nav-link {
    color: #6c757d;
    border: none;
    padding: 0.75rem 1rem;
    font-weight: 500;
}

.nav-tabs .nav-link.active {
    color: var(--app-primary);
    border-bottom: 3px solid var(--app-primary);
    background: transparent;
}

.table th {
    font-weight: 600;
    font-size: 0.875rem;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--app-primary) 0%, var(--app-secondary) 100%);
}

.btn {
    border-radius: var(--app-radius);
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, var(--app-primary) 0%, var(--app-secondary) 100%);
    border: none;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4391 100%);
}

.alert {
    border-radius: var(--app-radius);
    border: none;
}

.toast-container {
    pointer-events: none;
}

.toast-container .toast {
    pointer-events: auto;
}

@media (max-width: 991.98px) {
    .navbar-brand {
        font-size: 1rem;
    }

    h2.fw-bold {
        font-size: 1.35rem;
    }

    h3.fw-bold {
        font-size: 1.2rem;
    }

    h4.fw-bold {
        font-size: 1.1rem;
    }

    h5.fw-bold {
        font-size: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .card-header {
        padding: 0.75rem 1rem;
    }

    .row.g-4 .card-body {
        padding: 1rem;
    }

    .row.g-4 .card-body h2 {
        font-size: 1.5rem;
    }

    .row.g-4 .card-body p {
        font-size: 0.85rem;
    }

    .row.g-4 .card-body i[style*="font-size: 3rem"] {
        font-size: 2rem !important;
    }

    .modal-dialog:not(.modal-sm) {
        margin: 0.5rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .breadcrumb {
        font-size: 0.85rem;
    }
}

@media (max-width: 767.98px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    h2.fw-bold {
        font-size: 1.2rem;
    }

    h3.fw-bold {
        font-size: 1.1rem;
    }

    .navbar .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .navbar .dropdown-menu {
        border: none;
        background: rgba(255, 255, 255, 0.1);
        margin: 0;
        padding: 0;
    }

    .navbar .dropdown-menu .dropdown-item {
        color: rgba(255, 255, 255, 0.9);
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .navbar .dropdown-menu .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.15);
    }

    .navbar .dropdown-menu .dropdown-item-text {
        color: rgba(255, 255, 255, 0.7);
    }

    .navbar .dropdown-divider {
        border-color: rgba(255, 255, 255, 0.15);
    }

    .row.g-4 .card-body {
        padding: 0.75rem;
    }

    .row.g-4 .card-body h2 {
        font-size: 1.3rem;
    }

    .row.g-4 .card-body i[style*="font-size: 3rem"] {
        font-size: 1.5rem !important;
    }

    .card-hover .card-body {
        padding: 1rem;
    }

    .card-hover .card-body i.fs-2 {
        font-size: 1.5rem !important;
    }

    .card-hover .card-body h5 {
        font-size: 0.95rem;
    }

    .card-hover .card-body p {
        font-size: 0.8rem;
    }

    .table-responsive table {
        font-size: 0.8rem;
    }

    .table-responsive .table th {
        font-size: 0.75rem;
        white-space: nowrap;
    }

    .table-responsive .table td {
        white-space: nowrap;
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .pagination .page-link {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    .nav-tabs .nav-link {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }

    .nav-tabs .nav-link i {
        margin-right: 2px;
    }

    .btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.75rem;
    }

    .btn-sm {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }

    .accordion-button {
        font-size: 0.85rem;
        padding: 0.75rem;
    }

    .accordion-body {
        padding: 0.5rem;
    }

    .btn-group .btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }

    .modal-footer .btn {
        font-size: 0.85rem;
    }

    .input-group-sm .form-control,
    .input-group-sm .btn {
        font-size: 0.8rem;
    }

    .input-group[style*="max-width: 280px"] {
        max-width: 100% !important;
    }

    .row.g-3 .card-body {
        padding: 0.75rem;
    }

    .row.g-3 .fw-bold.fs-3 {
        font-size: 1.2rem !important;
    }

    #report-map {
        height: 250px !important;
    }

    #checkin-map {
        height: 200px !important;
        min-height: 200px !important;
    }

    #picker-map {
        height: 250px !important;
    }

    #loc-picker-map {
        height: 220px !important;
    }

    .login-card .login-header {
        padding: 24px 20px 20px;
    }

    .login-card .login-header i.main-icon {
        font-size: 2.5rem;
    }

    .login-card .login-header h3 {
        font-size: 1.3rem;
    }

    .login-card .p-4 {
        padding: 1.25rem !important;
    }

    .table-sm th,
    .table-sm td {
        font-size: 0.8rem;
    }

    .table-sm th {
        width: 120px !important;
    }

    #pairing-code-input {
        font-size: 1rem !important;
        letter-spacing: 2px !important;
    }

    .table td,
    .table th {
        font-size: 0.8rem;
    }

    .table.small td,
    .table.small th {
        font-size: 0.75rem;
    }

    .display-1 {
        font-size: 4rem;
    }

    .error-page-wrapper i[style*="font-size: 5rem"] {
        font-size: 3rem !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding-left: 8px;
        padding-right: 8px;
    }

    h2.fw-bold {
        font-size: 1.1rem;
    }

    .row.g-4 {
        margin-left: -4px;
        margin-right: -4px;
    }

    .row.g-4 > [class*="col-"] {
        padding-left: 4px;
        padding-right: 4px;
    }

    .btn span.btn-text-mobile {
        display: none;
    }

    .table-responsive .table th,
    .table-responsive .table td {
        padding: 0.3rem 0.4rem;
        font-size: 0.7rem;
    }

    .modal-footer {
        padding: 0.75rem;
    }

    .modal-footer .btn {
        font-size: 0.8rem;
    }

    .d-flex.gap-1 .btn {
        padding: 0.2rem 0.4rem;
    }

    .d-flex.gap-1 .btn i {
        font-size: 0.8rem;
    }

    .accordion-button .badge {
        font-size: 0.7rem;
    }

    .accordion-button small.text-muted {
        display: none;
    }

    .table td strong + br + small {
        display: none;
    }
}

@media (max-width: 576px) {
    .table-responsive .hide-mobile {
        display: none;
    }

    .activity-log-table td:nth-child(5),
    .activity-log-table th:nth-child(5) {
        display: none;
    }

    .report-detail-table td:nth-child(6),
    .report-detail-table th:nth-child(6),
    .report-detail-table td:nth-child(7),
    .report-detail-table th:nth-child(7),
    .report-detail-table td:nth-child(8),
    .report-detail-table th:nth-child(8) {
        display: none;
    }

    .pair-devices-table td:nth-child(4),
    .pair-devices-table th:nth-child(4) {
        display: none;
    }

    .member-link-cell .input-group {
        flex-direction: column;
    }

    .member-link-cell .input-group .form-control {
        border-radius: 6px !important;
        margin-bottom: 4px;
    }

    .member-link-cell .input-group .btn {
        border-radius: 6px !important;
        width: 100%;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .row.g-4 .card-body {
        padding: 0.9rem;
    }

    .row.g-4 .card-body h2 {
        font-size: 1.4rem;
    }

    .table-responsive .table td,
    .table-responsive .table th {
        padding: 0.4rem 0.5rem;
        font-size: 0.8rem;
    }

    .col-md-6.col-lg-5 {
        flex: 0 0 auto;
        width: 70%;
    }
}
