* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 100%;
    overflow: hidden;
}

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

.header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.user-info {
    font-size: 14px;
    opacity: 0.9;
}

.content {
    padding: 30px;
}

.login-form {
    max-width: 400px;
    margin: 0 auto;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

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

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

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

.btn-secondary:hover {
    background: #4b5563;
}

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

.dialer-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

.dialer-section h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
}

.cli-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.cli-option {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.cli-option:hover {
    border-color: #667eea;
}

.cli-option.selected {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.call-status {
    padding: 20px;
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    border-radius: 6px;
    margin: 20px 0;
}

.call-status.success {
    background: #f0fdf4;
    border-color: #10b981;
}

.call-status.error {
    background: #fef2f2;
    border-color: #ef4444;
}

.call-status h3 {
    margin-bottom: 10px;
    color: #1f2937;
}

.call-info {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
}

.call-timer {
    text-align: center;
    padding: 20px;
    margin: 20px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.timer-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timer-display {
    font-size: 48px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.call-details {
    background: #f9fafb;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 14px;
}

.call-details div {
    padding: 5px 0;
}

.dtmf-input {
    margin: 20px 0;
}

.dtmf-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 300px;
    margin: 0 auto;
}

.dtmf-btn {
    padding: 20px;
    font-size: 24px;
    font-weight: 600;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    color: #333;
}

.dtmf-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: scale(1.05);
}

.dtmf-btn:active {
    transform: scale(0.95);
}

.dtmf-btn.dtmf-hash {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.dtmf-btn.dtmf-hash:hover {
    background: #059669;
    border-color: #059669;
}

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

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

.history-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.history-table tr:hover {
    background: #f9fafb;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-initiated {
    background: #dbeafe;
    color: #1e40af;
}

.status-answered {
    background: #fef3c7;
    color: #92400e;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.admin-section {
    margin-top: 30px;
    padding: 20px;
    background: #fef3c7;
    border-radius: 8px;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.hidden {
    display: none;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

@media (max-width: 768px) {
    body {
        padding: 5px;
        align-items: flex-start;
    }

    .container {
        border-radius: 8px;
        max-width: 100%;
    }

    .header {
        padding: 20px 15px;
    }

    .header h1 {
        font-size: 24px;
    }

    .content {
        padding: 15px;
    }

    .dialer-section {
        padding: 15px;
        margin-bottom: 20px;
    }

    .dialer-section h2 {
        font-size: 18px;
    }

    .cli-selector {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }

    .cli-option {
        padding: 15px 10px;
        font-size: 14px;
    }

    .button-group {
        flex-direction: column;
        gap: 8px;
    }

    .btn {
        width: 100%;
        padding: 15px 20px;
        font-size: 16px;
        min-height: 48px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 14px;
        font-size: 16px;
        min-height: 48px;
    }

    .timer-display {
        font-size: 36px;
    }

    .call-timer {
        padding: 15px;
        margin: 15px 0;
    }

    .dtmf-keypad {
        max-width: 100%;
        gap: 10px;
    }

    .dtmf-btn {
        padding: 18px;
        font-size: 22px;
        min-height: 60px;
    }

    .history-table {
        font-size: 12px;
    }

    .history-table th,
    .history-table td {
        padding: 8px 6px;
    }

    .call-details {
        font-size: 13px;
    }

    .admin-section {
        padding: 15px;
    }
}
