/* Phone Numbers Page Styles */

.page-content {
    padding: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.container h1 {
    margin-bottom: 24px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #333;
}

.tab {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    color: #888;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
    width: auto;
}

.tab:hover {
    color: #eee;
}

.tab.active {
    color: #00d4ff;
    border-bottom-color: #00d4ff;
}

.tab-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

/* Loading State */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #333;
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.small {
    font-size: 12px;
}

/* Lines List */
.lines-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Line Card */
.line-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    transition: all 0.2s;
}

.line-card:hover {
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.1);
}

.line-info {
    flex: 1;
    min-width: 0;
}

.line-name {
    font-weight: 600;
    font-size: 16px;
    color: #eee;
    margin-bottom: 6px;
}

.line-details {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: #888;
}

.line-detail-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.line-phone {
    color: #00d4ff;
    font-family: monospace;
    font-weight: 600;
}

.line-agent-badge {
    background: #1a1a2e;
    border: 1px solid #333;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #2ed573;
    font-weight: 600;
}

.line-date {
    font-size: 12px;
}

/* Line Actions */
.line-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 16px;
}

.btn-edit {
    background: #333;
    color: #eee;
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    width: auto;
}

.btn-edit:hover {
    background: #444;
}

.btn-delete {
    background: transparent;
    color: #ff4757;
    padding: 8px 14px;
    border: 1px solid #ff4757;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: auto;
}

.btn-delete:hover {
    background: #ff4757;
    color: #fff;
}

.btn-delete:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-delete:disabled:hover {
    background: transparent;
    color: #ff4757;
}

.btn-manage {
    background: transparent;
    color: #00d4ff;
    padding: 8px 14px;
    border: 1px solid #00d4ff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: auto;
}

.btn-manage:hover {
    background: #00d4ff;
    color: #000;
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-blue { background: #1e3a5f; color: #60a5fa; }
.badge-green { background: #14532d; color: #4ade80; }
.badge-gray { background: #1f2937; color: #9ca3af; }
.badge-yellow { background: #422006; color: #facc15; }
.badge-red { background: #450a0a; color: #f87171; }
.badge-cyan { background: #0c3547; color: #00d4ff; }

.badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

/* Sync status */
.sync-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.35rem;
}

.sync-dot.synced { background: #2ed573; }
.sync-dot.not-synced { background: #ff4757; }

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    width: 90%;
    max-width: 550px;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #333;
}

.modal-header h3 {
    font-size: 16px;
    color: #00d4ff;
}

.btn-close {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: auto;
}

.btn-close:hover {
    color: #eee;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #333;
}

.modal-footer button {
    width: auto;
}

/* Confirm Dialog */
.confirm-text {
    font-size: 14px;
    color: #eee;
    line-height: 1.5;
    margin-bottom: 8px;
}

.confirm-detail {
    font-size: 13px;
    color: #888;
    font-family: monospace;
    background: #0f0f23;
    padding: 8px 12px;
    border-radius: 6px;
}

/* Success Message */
.success-message {
    background: #2ed573;
    color: #000;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}

/* Checkbox group in modals */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid #333;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #eee;
    margin-bottom: 0;
    transition: all 0.2s;
}

.checkbox-group label:hover {
    border-color: #555;
}

.checkbox-group label:has(input:checked) {
    background: #0c3547;
    border-color: #00d4ff;
}

.checkbox-group input[type="checkbox"] {
    accent-color: #00d4ff;
}

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

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Manage numbers modal - assigned list */
.assigned-numbers-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.assigned-number-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #0f0f23;
    border-radius: 6px;
    font-size: 13px;
}

.assigned-number-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #eee;
}

.assigned-number-phone {
    color: #00d4ff;
    font-family: monospace;
    font-weight: 600;
}

.btn-remove {
    background: transparent;
    color: #ff4757;
    border: 1px solid #ff4757;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: auto;
}

.btn-remove:hover {
    background: #ff4757;
    color: #fff;
}

/* Line detail separator */
.line-detail-separator {
    color: #333;
}

/* SIP detail styling */
.line-sip {
    font-family: monospace;
    font-size: 12px;
    color: #aaa;
}

/* Responsive */
@media (max-width: 600px) {
    .tabs {
        overflow-x: auto;
    }

    .tab {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .line-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .line-actions {
        margin-left: 0;
        width: 100%;
    }

    .btn-edit, .btn-delete, .btn-manage {
        flex: 1;
        text-align: center;
    }

    .line-details {
        flex-direction: column;
        gap: 4px;
    }

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

    .form-row .form-group {
        margin-bottom: 16px;
    }
}
