:root {
    --app-font-size: 13.5px;
    --app-line-height: 1.45;
    --app-text: #1f2937;
    --app-muted: #6b7280;
    --app-link: #2563eb;
    --app-link-hover: #1d4ed8;
    --app-bg-start: #e0eafc;
    --app-bg-end: #cfdef3;
    --card-bg: #ffffff;
    --card-border: #dbe4f1;
    --card-radius: 18px;
    --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --space-1: 6px;
    --space-2: 10px;
    --space-3: 14px;
    --space-4: 18px;
    --space-5: 24px;
    --input-height: 40px;
    --dtmf-height: 58px;
    --success: #5cb85c;
    --success-hover: #4cae4c;
    --danger: #dc3545;
}

body {
    font-family: "Segoe UI", sans-serif;
    font-size: var(--app-font-size);
    line-height: var(--app-line-height);
    color: var(--app-text);
    background: linear-gradient(135deg, var(--app-bg-start) 0%, var(--app-bg-end) 100%);
    min-height: 100vh;
    margin: 0;
}

a {
    color: var(--app-link);
    text-decoration: none;
}

a:hover {
    color: var(--app-link-hover);
    text-decoration: underline;
}

body.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
}

h2 {
    font-size: 1.45rem;
    margin-bottom: var(--space-3);
}

h4 {
    font-size: 1.05rem;
    margin-bottom: var(--space-3);
}

.form-label,
.form-control,
.btn,
.table {
    font-size: 0.92rem;
}

.form-label {
    color: var(--app-muted);
    font-weight: 600;
}

.form-control {
    min-height: var(--input-height);
    border-color: #cfd8e3;
}

.form-control:focus {
    border-color: #8bb6ff;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15);
}

.panel-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: var(--space-5);
}

.login-wrapper {
    width: 100%;
    max-width: 380px;
    margin: auto;
}

.edit-wrapper {
    width: 100%;
    max-width: 420px;
    margin: auto;
}

.btn-success {
    font-weight: 600;
    letter-spacing: 1px;
}

.btn-add {
    background: var(--success);
    color: #fff;
    border: none;
    padding: var(--space-2) var(--space-4);
    cursor: pointer;
    border-radius: 6px;
    font-weight: 600;
    min-height: var(--dtmf-height);
    transition: background-color 0.2s ease;
}

.btn-add:hover {
    background: var(--success-hover);
    color: #fff;
}

.status-on {
    color: var(--success);
    font-weight: bold;
}

.status-off {
    color: var(--danger);
    font-weight: bold;
}

.table-responsive {
    margin-top: var(--space-2);
}

.table thead th {
    font-weight: 600;
    color: #334155;
}

.dtmf-cell {
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
}

.dtmf-cell:hover {
    white-space: normal;
    overflow: visible;
    background: #f8f9fa;
    z-index: 2;
    position: relative;
}

.dtmf-input {
    min-height: var(--dtmf-height);
    resize: vertical;
    font-family: "Consolas", "Monaco", monospace;
    line-height: 1.4;
}

.container {
    max-width: 1140px;
}
