/* Custom styles for ATS Panel */

/* General Layout */
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 10px;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    border-radius: 10px 10px 0 0 !important;
}

/* Status Badges */
.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
}

.status-online {
    background-color: #28a745 !important;
    color: white;
}

.status-offline {
    background-color: #6c757d !important;
    color: white;
}

.status-away {
    background-color: #ffc107 !important;
    color: #000;
}

.status-busy {
    background-color: #dc3545 !important;
    color: white;
}

/* Employee Cards */
.employee-card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    cursor: pointer;
}

.employee-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    border-color: #007bff;
}

/* Activity Feed */
.activity-feed {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #eee;
}

.activity-item:hover {
    background-color: #f8f9fa;
}

.activity-item:last-child {
    border-bottom: none;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead th {
    border-top: none;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    padding: 0.75rem 0.5rem;
}

.table tbody td {
    padding: 0.75rem 0.5rem;
    vertical-align: middle;
}

/* Device table specific styling */
#deviceTable th,
#deviceTable td {
    border-left: none;
    border-right: none;
}

#deviceTable th:first-child,
#deviceTable td:first-child {
    /* First column is now the icon column; keep default padding */
    padding-left: 0.5rem;
}

#deviceTable th:last-child,
#deviceTable td:last-child {
    padding-right: 1rem;
}

/* Device column is now the second column */
#deviceTable th:nth-child(2),
#deviceTable td:nth-child(2) {
    /* Device column spacing */
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* Ensure icon column has enough space and square layout */
#deviceTable th.icon-col,
#deviceTable td.icon-col {
    width: 8%;
    min-width: 6%;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    border: none;
    color: #000;
}

/* Forms */
.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 8px;
    font-weight: 500;
}

/* Pagination */
.pagination .page-link {
    border-radius: 6px;
    margin: 0 2px;
    border: 1px solid #dee2e6;
    color: #007bff;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-color: #007bff;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Statistics Cards */
.stats-card {
    background: linear-gradient(135deg, var(--card-color-start) 0%, var(--card-color-end) 100%);
    border: none;
    color: white;
    transition: transform 0.3s ease;
}

.stats-card:hover {
    transform: scale(1.05);
}

.stats-card .card-body {
    position: relative;
    overflow: hidden;
}

.stats-card .card-body::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    z-index: 0;
}

.stats-card .card-body > * {
    position: relative;
    z-index: 1;
}

/* Messages */
.message-card {
    border-left: 4px solid;
    transition: all 0.3s ease;
}

.message-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.message-notification {
    border-left-color: #007bff;
}

.message-alert {
    border-left-color: #dc3545;
}

.message-reminder {
    border-left-color: #ffc107;
}

.message-announcement {
    border-left-color: #28a745;
}

.priority-low {
    opacity: 0.7;
}

.priority-normal {
    opacity: 0.9;
}

.priority-high {
    opacity: 1;
    font-weight: 600;
}

.priority-urgent {
    opacity: 1;
    font-weight: 700;
    background-color: #fff5f5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .employee-card {
        margin-bottom: 1rem;
    }
    
    .activity-feed {
        max-height: 300px;
    }
    
    .stats-card {
        margin-bottom: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn:last-child {
        margin-bottom: 0;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e9ecef;
    }
    
    .card {
        background-color: #2d3748;
        color: #e9ecef;
    }
    
    .card-header {
        background-color: #374151;
        border-bottom-color: #4a5568;
    }
    
    .table {
        color: #e9ecef;
    }
    
    .table thead th {
        background-color: #374151;
        border-bottom-color: #4a5568;
    }
    
    .table tbody tr:hover {
        background-color: #374151;
    }
    
    .activity-item:hover {
        background-color: #374151;
    }
}

/* Utility Classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-soft {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.border-radius-lg {
    border-radius: 15px !important;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
}

.bg-gradient-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%) !important;
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Balance Review Styles */
.balance-review-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.balance-review-box {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    min-width: 200px;
    flex: 1;
    transition: all 0.2s ease;
}

.balance-review-box:hover {
    background: var(--background-secondary);
    border-color: #11cc11;
    transform: translateY(-1px);
}

.balance-review-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balance-review-value {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--background-primary);
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
    word-break: break-all;
}

.balance-review-value:hover {
    background: #11cc11;
    color: var(--text-primary);
    border-color: #11cc11;
    transform: scale(1.02);
}

.balance-review-timestamp {
    width: 100%;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

/* Table header button group */
.card-header .d-flex.align-items-center.gap-2 {
    gap: 0.5rem !important;
}

.card-header .btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Notification badge in table header */
.card-header .notification-badge {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.card-header .notification-badge:hover {
    opacity: 0.8;
}

/* Action column styling */
#deviceTable td:last-child {
    white-space: nowrap;
}

#deviceTable td:last-child .btn-group {
    gap: 0.25rem;
}

#deviceTable td:last-child .btn-group .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    min-width: auto;
}

/* Disabled button styling for notification test */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled:hover {
    transform: none !important;
}

 