/* style.css - Agent Portal Mobile Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --danger-color: #dc2626;
    --success-color: #16a34a;
    --warning-color: #ea580c;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    padding-bottom: 70px;
}

/* 404 Error Page */
.error-404 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
    padding: 20px;
}

.error-404 h1 {
    font-size: 72px;
    color: var(--danger-color);
    margin-bottom: 10px;
}

.error-404 p {
    font-size: 18px;
    color: var(--gray-600);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 24px;
}

.login-box p {
    text-align: center;
    color: var(--gray-600);
    margin-bottom: 25px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--primary-dark);
}

.btn:active {
    transform: scale(0.98);
}

.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background-color: #fee2e2;
    color: var(--danger-color);
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #dcfce7;
    color: var(--success-color);
    border: 1px solid #bbf7d0;
}

/* Header */
.header {
    background: white;
    padding: 15px 20px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 20px;
    color: var(--gray-900);
}

.header-actions {
    display: flex;
    gap: 10px;
}

.logout-btn {
    padding: 8px 16px;
    background-color: var(--danger-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}

/* Main Content */
.container {
    padding: 20px;
    max-width: 756px;
    margin: 0 auto;
}

/* Filter Section */
.filter-section {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.filter-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--gray-800);
}

.filter-group {
    margin-bottom: 12px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    color: var(--gray-700);
    font-weight: 500;
}

.filter-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-filter, .btn-clear {
    flex: 1;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.btn-filter {
    background-color: var(--primary-color);
    color: white;
}

.btn-clear {
    background-color: var(--gray-200);
    color: var(--gray-700);
}

/* Call Table */
.calls-table-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.calls-table {
    width: 100%;
    border-collapse: collapse;
}

.calls-table thead {
    background-color: var(--gray-100);
}

.calls-table th {
    padding: 12px 10px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
}

.calls-table td {
    padding: 12px 10px;
    font-size: 14px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-800);
}

.calls-table tr:last-child td {
    border-bottom: none;
}

.calls-table tbody tr:hover {
    background-color: var(--gray-50);
}

.tel-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.tel-link:hover {
    text-decoration: underline;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    margin-top: 15px;
    box-shadow: var(--shadow);
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid var(--gray-300);
    background: white;
    color: var(--gray-700);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination span {
    font-size: 14px;
    color: var(--gray-700);
}

/* Calls Page Sections */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header h2 {
    font-size: 18px;
    color: var(--gray-900);
}

.count-badge {
    background-color: var(--danger-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.count-badge.success {
    background-color: var(--success-color);
}

.call-card {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
}

.call-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.call-info h3 {
    font-size: 16px;
    color: var(--gray-900);
    margin-bottom: 5px;
}

.call-info p {
    font-size: 13px;
    color: var(--gray-600);
    margin: 2px 0;
}

.action-btn {
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
}

.action-btn.view {
    background-color: var(--gray-600);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-600);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    color: var(--gray-900);
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--gray-600);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
}

.modal-body {
    padding: 20px;
}

.call-detail-row {
    margin-bottom: 15px;
}

.call-detail-row label {
    display: block;
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 5px;
    font-weight: 500;
}

.call-detail-row .value {
    font-size: 15px;
    color: var(--gray-900);
}

.feedback-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
}

.feedback-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 10px;
}

.modal-footer button {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.btn-submit {
    background-color: var(--primary-color);
    color: white;
}

.btn-cancel {
    background-color: var(--gray-200);
    color: var(--gray-700);
}

/* Profile Page */
.profile-container {
    max-width: 500px;
    margin: 0 auto;
}

.profile-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 40px;
    color: white;
    font-weight: bold;
}

.profile-name {
    font-size: 24px;
    color: var(--gray-900);
    margin-bottom: 5px;
}

.profile-role {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-stats {
    background: var(--gray-50);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.stat-item {
    margin-bottom: 10px;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-label {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 28px;
    color: var(--primary-color);
    font-weight: bold;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 999;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--gray-600);
    text-decoration: none;
    padding: 5px 15px;
    position: relative;
    flex: 1;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-icon {
    font-size: 24px;
    margin-bottom: 4px;
    position: relative;
}

.nav-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
}

.nav-label {
    font-size: 12px;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 480px) {
    .calls-table th:nth-child(4),
    .calls-table td:nth-child(4) {
        display: none;
    }
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 20px;
    color: var(--gray-600);
}

.spinner {
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}