/* DTR System Custom Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navigation Notification Badges */
.nav-link .badge {
    font-size: 0.65rem;
    padding: 0.2em 0.45em;
    font-weight: 700;
    vertical-align: middle;
    animation: pulse 2s infinite;
}

.dropdown-item .badge {
    font-size: 0.7rem;
    padding: 0.25em 0.5em;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Custom Card Styles */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), #084298);
    color: white;
    border-radius: 10px 10px 0 0 !important;
    border: none;
    font-weight: 600;
}

/* Dashboard Cards */
.stats-card {
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s;
}

.stats-card:hover {
    transform: translateY(-2px);
}

.stats-card .card-body {
    padding: 1.5rem;
}

.stats-card .stats-icon {
    font-size: 2.5rem;
    opacity: 0.7;
}

.stats-card .stats-number {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
}

.stats-card .stats-label {
    color: #6c757d;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

/* Status Badges */
.status-active { background-color: var(--success-color) !important; }
.status-inactive { background-color: var(--secondary-color) !important; }
.status-pending { background-color: var(--warning-color) !important; color: #000 !important; }
.status-approved { background-color: var(--success-color) !important; color: #fff !important; }
.status-completed { 
    background-color: #0dcaf0 !important; 
    color: #000 !important; 
    font-weight: 700 !important;
}
.badge.status-completed {
    background-color: #0dcaf0 !important; 
    color: #000 !important; 
    font-weight: 700 !important;
}
span.status-completed {
    background-color: #0dcaf0 !important; 
    color: #000 !important; 
    font-weight: 700 !important;
}
.status-rejected { background-color: var(--danger-color) !important; }
.status-present { background-color: var(--success-color) !important; }
.status-absent { background-color: var(--danger-color) !important; }
.status-on-leave { background-color: var(--info-color) !important; color: #000 !important; }
.status-travel-order { background-color: var(--warning-color) !important; color: #000 !important; }
.status-holiday { background-color: var(--secondary-color) !important; }

/* Form Styles */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Button Styles */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #084298);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #084298, var(--primary-color));
    transform: translateY(-1px);
}

/* Table Styles */
.table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color), #084298);
    color: white;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: background-color 0.15s ease-in-out;
}

.table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Navigation Styles */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.15s ease-in-out;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Dropdown Menu Improvements */
.dropdown-menu {
    border-radius: 10px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: none;
    padding: 0.5rem 0;
}

.dropdown-header {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem;
    margin-top: 0.25rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.15s ease-in-out;
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: rgba(13, 110, 253, 0.1);
    padding-left: 1.25rem;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    color: var(--primary-color);
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* Badge positioning in dropdown */
.dropdown-item.position-relative .badge {
    font-size: 0.65rem;
    padding: 0.25em 0.5em;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 10px;
    font-weight: 500;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Time Record Styles */
.time-input {
    max-width: 120px;
}

.employee-card {
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: white;
    transition: all 0.15s ease-in-out;
}

.employee-card:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.employee-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #084298);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-right: 1rem;
}

/* Calendar Styles */
.calendar-day {
    min-height: 100px;
    border: 1px solid #dee2e6;
    padding: 0.5rem;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.calendar-day:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.calendar-day.today {
    background-color: rgba(13, 110, 253, 0.1);
    border-color: var(--primary-color);
}

.calendar-day.holiday {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: var(--danger-color);
}

.calendar-day.weekend {
    background-color: rgba(108, 117, 125, 0.1);
}

/* Print Styles */
@media print {
    .navbar, .btn, .card-header .btn, .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
    
    .table {
        box-shadow: none !important;
    }
    
    .table thead th {
        background: #f8f9fa !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Typography - Mobile Friendly */
    h1, .h1 {
        font-size: 1.5rem !important;
    }
    
    h2, .h2 {
        font-size: 1.35rem !important;
    }
    
    h3, .h3 {
        font-size: 1.2rem !important;
    }
    
    h4, .h4 {
        font-size: 1.1rem !important;
    }
    
    h5, .h5 {
        font-size: 1rem !important;
    }
    
    h6, .h6 {
        font-size: 0.9rem !important;
    }
    
    p, .text-muted {
        font-size: 0.875rem !important;
    }
    
    small, .small {
        font-size: 0.75rem !important;
    }
    
    /* Card Styles */
    .card {
        margin-bottom: 0.75rem;
    }
    
    .card-header {
        padding: 0.75rem 1rem !important;
        font-size: 0.95rem !important;
    }
    
    .card-header h5, .card-header .h5 {
        font-size: 0.95rem !important;
        margin-bottom: 0 !important;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .card-footer {
        padding: 0.75rem 1rem !important;
    }
    
    /* Stats Cards */
    .stats-card .card-body {
        padding: 0.875rem !important;
    }
    
    .stats-card .stats-number {
        font-size: 1.5rem !important;
    }
    
    .stats-card .stats-icon {
        font-size: 2rem !important;
    }
    
    .stats-card .stats-label {
        font-size: 0.75rem !important;
    }
    
    /* Button Styles */
    .btn {
        font-size: 0.875rem !important;
        padding: 0.5rem 0.875rem !important;
    }
    
    .btn-sm {
        font-size: 0.75rem !important;
        padding: 0.375rem 0.625rem !important;
    }
    
    .btn-lg {
        font-size: 1rem !important;
        padding: 0.625rem 1rem !important;
    }
    
    /* Form Elements */
    .form-label {
        font-size: 0.875rem !important;
        margin-bottom: 0.375rem !important;
    }
    
    .form-control,
    .form-select {
        font-size: 0.875rem !important;
        padding: 0.5rem 0.75rem !important;
    }
    
    .form-control-sm,
    .form-select-sm {
        font-size: 0.75rem !important;
        padding: 0.375rem 0.625rem !important;
    }
    
    /* Table Styles */
    .table {
        font-size: 0.8rem !important;
    }
    
    .table thead th {
        font-size: 0.75rem !important;
        padding: 0.5rem 0.5rem !important;
    }
    
    .table tbody td {
        padding: 0.5rem 0.5rem !important;
    }
    
    .table-responsive {
        border-radius: 10px;
    }
    
    /* Badge Styles */
    .badge {
        font-size: 0.7rem !important;
        padding: 0.3em 0.55em !important;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.2rem !important;
    }
    
    .navbar-nav .nav-link {
        font-size: 0.9rem !important;
        padding: 0.5rem 0.75rem !important;
    }
    
    /* Dropdown Menu */
    .dropdown-menu {
        font-size: 0.875rem !important;
    }
    
    .dropdown-item {
        padding: 0.5rem 0.875rem !important;
        font-size: 0.875rem !important;
    }
    
    .dropdown-header {
        font-size: 0.7rem !important;
        padding: 0.375rem 0.875rem !important;
    }
    
    /* Employee Avatar */
    .employee-avatar {
        width: 40px !important;
        height: 40px !important;
        font-size: 1rem !important;
        margin-right: 0.75rem !important;
    }
    
    /* List Group */
    .list-group-item {
        padding: 0.75rem 1rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Modal */
    .modal-header {
        padding: 0.875rem 1rem !important;
    }
    
    .modal-title {
        font-size: 1.1rem !important;
    }
    
    .modal-body {
        padding: 1rem !important;
        font-size: 0.875rem !important;
    }
    
    .modal-footer {
        padding: 0.75rem 1rem !important;
    }
    
    /* Alert */
    .alert {
        padding: 0.75rem 1rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Spacing Utilities */
    .mb-4 {
        margin-bottom: 1rem !important;
    }
    
    .mb-3 {
        margin-bottom: 0.75rem !important;
    }
    
    .py-4 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    
    .py-3 {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
}

/* Extra Small Devices (≤576px) */
@media (max-width: 576px) {
    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    /* Typography */
    h1, .h1 {
        font-size: 1.35rem !important;
    }
    
    h2, .h2 {
        font-size: 1.2rem !important;
    }
    
    h3, .h3 {
        font-size: 1.1rem !important;
    }
    
    h4, .h4 {
        font-size: 1rem !important;
    }
    
    h5, .h5 {
        font-size: 0.9rem !important;
    }
    
    h6, .h6 {
        font-size: 0.85rem !important;
    }
    
    p {
        font-size: 0.85rem !important;
    }
    
    /* Card Styles */
    .card-header {
        padding: 0.625rem 0.75rem !important;
        font-size: 0.875rem !important;
    }
    
    .card-body {
        padding: 0.75rem !important;
    }
    
    .card-footer {
        padding: 0.625rem 0.75rem !important;
    }
    
    /* Stats Cards */
    .stats-card .card-body {
        padding: 0.75rem !important;
    }
    
    .stats-card .stats-number {
        font-size: 1.35rem !important;
    }
    
    .stats-card .stats-icon {
        font-size: 1.75rem !important;
    }
    
    .stats-card .stats-label {
        font-size: 0.7rem !important;
    }
    
    /* Buttons */
    .btn {
        font-size: 0.8rem !important;
        padding: 0.45rem 0.75rem !important;
    }
    
    .btn-sm {
        font-size: 0.7rem !important;
        padding: 0.3rem 0.5rem !important;
    }
    
    /* Forms */
    .form-label {
        font-size: 0.8rem !important;
    }
    
    .form-control,
    .form-select {
        font-size: 0.8rem !important;
        padding: 0.45rem 0.65rem !important;
    }
    
    /* Table */
    .table {
        font-size: 0.75rem !important;
    }
    
    .table thead th {
        font-size: 0.7rem !important;
        padding: 0.4rem 0.4rem !important;
    }
    
    .table tbody td {
        padding: 0.4rem 0.4rem !important;
    }
    
    /* Badge */
    .badge {
        font-size: 0.65rem !important;
        padding: 0.25em 0.5em !important;
    }
    
    /* Employee Avatar */
    .employee-avatar {
        width: 35px !important;
        height: 35px !important;
        font-size: 0.875rem !important;
        margin-right: 0.625rem !important;
    }
    
    /* Modal */
    .modal-title {
        font-size: 1rem !important;
    }
    
    .modal-body {
        font-size: 0.8rem !important;
    }
}

/* Tablet/Medium Devices (768px - 991px) */
@media (min-width: 769px) and (max-width: 991px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1, .h1 {
        font-size: 1.75rem !important;
    }
    
    h2, .h2 {
        font-size: 1.5rem !important;
    }
    
    .card-header {
        font-size: 1rem !important;
    }
    
    .btn {
        font-size: 0.9rem !important;
    }
}

/* Custom Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), #084298);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), #084298) !important;
}

.border-radius-10 {
    border-radius: 10px !important;
}

.shadow-sm-hover {
    transition: box-shadow 0.15s ease-in-out;
}

.shadow-sm-hover:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}