/* Finist Call Records - Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

/* Filters */
.filters {
    padding: 25px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 0.85em;
    font-weight: 600;
    color: #495057;
}

.filter-group input,
.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.95em;
    min-width: 150px;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-primary, .btn-secondary, .btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.btn-primary {
    background: #667eea;
    color: #ffffff;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

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

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

.btn {
    background: #e9ecef;
    color: #495057;
}

.btn:hover {
    background: #dee2e6;
}

/* Pagination */
.pagination {
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.page-info {
    font-weight: 600;
    color: #495057;
}

/* Table */
.table-wrapper {
    overflow-x: auto;
}

.calls-table {
    width: 100%;
    border-collapse: collapse;
}

.calls-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.calls-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calls-table tbody tr {
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s;
}

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

.calls-table td {
    padding: 15px;
    vertical-align: top;
}

.date-time {
    white-space: nowrap;
    font-weight: 600;
    color: #495057;
}

.time {
    font-size: 0.85em;
    color: #6c757d;
    font-weight: normal;
}

.phone {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #212529;
}

.name {
    display: block;
    font-size: 0.85em;
    color: #6c757d;
    font-weight: normal;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto;
    margin-top: 3px;
}

.duration {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 1.1em;
    color: #28a745;
}

.status {
    font-weight: 600;
}

.status-answered {
    border-left: 4px solid #28a745;
}

.status-no.answer,
.status-busy,
.status-failed {
    border-left: 4px solid #dc3545;
}

.btn-play {
    padding: 5px 12px;
    background: #28a745;
    color: #ffffff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 600;
    display: inline-block;
    transition: all 0.2s;
}

.btn-play:hover {
    background: #218838;
    transform: scale(1.05);
}

.no-record {
    color: #adb5bd;
    font-size: 0.9em;
}

.b24-id {
    display: inline-block;
    padding: 3px 8px;
    background: #17a2b8;
    color: #ffffff;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: help;
}

.no-data {
    text-align: center;
    padding: 40px !important;
    color: #6c757d;
    font-style: italic;
}

/* Footer */
footer {
    padding: 20px 30px;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    color: #6c757d;
    font-size: 0.9em;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group input,
    .filter-group select {
        width: 100%;
    }
    
    .calls-table {
        font-size: 0.85em;
    }
    
    .calls-table th,
    .calls-table td {
        padding: 10px 8px;
    }
}
/* Additional styles for v2.0 */

.header-links {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-header {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-header:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-export {
    padding: 8px 20px;
    background: #28a745;
    color: #ffffff;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.btn-export:hover {
    background: #218838;
    transform: translateY(-1px);
}

.duration-filter {
    display: flex;
    align-items: center;
    gap: 5px;
}

.duration-filter input {
    padding: 8px 8px;
}

.duration-filter span {
    color: #6c757d;
}

.status-no-answer {
    border-left: 4px solid #dc3545;
}

/* Login styles */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-form h2 {
    text-align: center;
    color: #667eea;
    margin-bottom: 10px;
}

.login-form input {
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1em;
}

.login-form button {
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.login-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.error-message {
    padding: 12px;
    background: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 6px;
    color: #842029;
    text-align: center;
}

/* Stats page */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 30px;
}

.stat-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
}

.stat-card h3 {
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .value {
    font-size: 2.5em;
    font-weight: 700;
    color: #212529;
}

.stat-card .change {
    font-size: 0.85em;
    color: #28a745;
    margin-top: 5px;
}

.chart-container {
    margin: 30px;
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chart-container h3 {
    margin-bottom: 20px;
    color: #495057;
}

.top-employees {
    margin: 30px;
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.employee-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #dee2e6;
}

.employee-row:last-child {
    border-bottom: none;
}

.employee-name {
    font-weight: 600;
    color: #212529;
}

.employee-stats {
    display: flex;
    gap: 30px;
    color: #6c757d;
}

.employee-stats span {
    font-size: 0.9em;
}
