/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    color: #333;
}

/* Login page styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 420px;
    text-align: center;
    border-top: 4px solid #20c997;
}

.logo {
    width: 140px;
    height: 80px;
    margin: 0 auto 20px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #495057;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 2px;
    position: relative;
    border: 2px solid #e9ecef;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #20c997 0%, #17a2b8 100%);
    border-radius: 2px;
}

.login-title {
    color: #495057;
    margin-bottom: 8px;
    font-size: 24px;
    font-weight: 600;
}

.login-subtitle {
    color: #6c757d;
    margin-bottom: 30px;
    font-size: 14px;
    font-style: italic;
    font-weight: 400;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #495057;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #20c997;
    box-shadow: 0 0 0 3px rgba(32, 201, 151, 0.1);
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    color: white;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(32, 201, 151, 0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(73, 80, 87, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-info {
    background: #20c997;
    color: white;
}

.btn-info:hover {
    background: #1ea085;
}

.btn-warning {
    background: #ffc107;
    color: #495057;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* Dashboard styles */
.dashboard-container {
    min-height: 100vh;
    background: #f8f9fa;
}

.navbar {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.navbar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-decoration: none;
    position: relative;
}

.navbar-brand::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 40px;
    height: 2px;
    background: #20c997;
    border-radius: 1px;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: #adb5bd;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #20c997;
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: #495057;
    margin-bottom: 10px;
}

.page-subtitle {
    color: #6c757d;
    font-size: 16px;
}

/* Filter section */
.filters {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    border-left: 4px solid #20c997;
}

.filter-row {
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

/* Stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stats-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stats-title {
    font-size: 18px;
    font-weight: 600;
    color: #495057;
}

.stats-period {
    background: #e9ecef;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #6c757d;
}

.stats-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stats-numbers {
    flex: 1;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.stat-label {
    color: #6c757d;
    font-weight: 500;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
}

.stat-value.open {
    color: #dc3545;
}

.stat-value.resolved {
    color: #20c997;
}

.stat-value.total {
    color: #495057;
}

/* Chart container */
.chart-container {
    width: 120px;
    height: 120px;
    position: relative;
}

/* Alert messages */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d1f2eb;
    border-color: #20c997;
    color: #0c5460;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #20c997;
    color: #0c5460;
}

/* Admin panel styles */
.admin-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    border-left: 4px solid #495057;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.table tr:hover {
    background-color: #f8f9fa;
}

/* Form styles */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-col {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Responsive design */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .navbar-content {
        flex-direction: column;
        gap: 15px;
    }

    .filter-row {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stats-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .form-row {
        flex-direction: column;
    }

    .form-actions {
        justify-content: stretch;
    }

    .form-actions .btn {
        flex: 1;
    }
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #20c997;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Status badges */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background-color: #20c997;
    color: white;
}

.badge-danger {
    background-color: #dc3545;
    color: white;
}

.badge-secondary {
    background-color: #495057;
    color: white;
}

/* Action buttons in tables */
.table .btn {
    padding: 6px 12px;
    font-size: 12px;
    margin-right: 5px;
}

.table .btn:last-child {
    margin-right: 0;
}

/* Confirmation dialogs styling */
.btn-danger {
    background: #dc3545;
    color: white;
    border: 1px solid #dc3545;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #bd2130;
    transform: none; /* Override the transform from main btn styles */
}

/* Table action column */
.table td:last-child {
    white-space: nowrap;
}

/* Performance breakdown styles */
.performance-list {
    width: 100%;
}

.performance-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.performance-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.agent-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.agent-name {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.agent-stats {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #20c997 0%, #17a2b8 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.no-data {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

/* Admin-specific stats cards */
.stats-card .performance-list {
    max-height: 300px;
    overflow-y: auto;
}

/* Scrollbar styling for performance lists */
.performance-list::-webkit-scrollbar {
    width: 6px;
}

.performance-list::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 3px;
}

.performance-list::-webkit-scrollbar-thumb {
    background: #20c997;
    border-radius: 3px;
}

.performance-list::-webkit-scrollbar-thumb:hover {
    background: #1ea085;
} 