* {
    box-sizing: border-box;
    font-family: Tahoma, Arial, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background: #f3f6fb;
    color: #1f2937;
    direction: rtl;
}

.container {
    width: 92%;
    max-width: 1180px;
    margin: 30px auto;
}

.small-container {
    max-width: 800px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

h1 {
    margin: 0;
    color: #123c69;
    font-size: 30px;
}

h2 {
    margin-top: 0;
    color: #0f766e;
}

h3 {
    margin-top: 0;
}

.intro {
    background: #ffffff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    line-height: 2;
    margin-bottom: 22px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.07);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

input[type="text"],
textarea {
    width: 100%;
    border: 1px solid #cfd8e3;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    outline: none;
    transition: 0.2s;
    background: #fff;
}

input[type="text"]:focus,
textarea:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.9;
}

button,
.btn {
    display: inline-block;
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    transition: 0.2s;
}

button {
    width: 100%;
    background: #0f766e;
    color: white;
}

button:hover {
    background: #0b5f59;
}

.btn.secondary,
.admin-link {
    background: #123c69;
    color: #fff;
    padding: 10px 16px;
    border-radius: 12px;
    text-decoration: none;
}

.btn.secondary:hover,
.admin-link:hover {
    background: #0f3155;
}

.hint {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 13px;
}

.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-weight: bold;
}

.alert.success {
    background: #dcfce7;
    color: #166534;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
}

.info-row {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    line-height: 1.9;
    flex-wrap: wrap;
}

.label {
    font-weight: bold;
    color: #111827;
}

.status-section {
    margin-top: 24px;
}

.status-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 16px;
    line-height: 2;
    white-space: pre-wrap;
}

.actions {
    margin-top: 18px;
    text-align: center;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 850px;
}

th,
td {
    border: 1px solid #e5e7eb;
    padding: 12px;
    text-align: right;
    vertical-align: top;
    line-height: 1.9;
}

th {
    background: #f8fafc;
}

.empty-box {
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    color: #475569;
}

@media (max-width: 900px) {
    .grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 24px;
    }
}

.sms-preview-box {
    margin-bottom: 18px;
}

.sms-preview-title {
    font-weight: bold;
    margin-bottom: 8px;
    color: #0f766e;
}

.sms-preview {
    background: #f8fafc;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    padding: 14px;
    line-height: 2;
    white-space: pre-wrap;
    color: #1f2937;
}

.center-topbar {
    justify-content: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.07);
    text-align: center;
}

.stat-title {
    font-size: 14px;
    color: #475569;
    margin-bottom: 10px;
    line-height: 1.8;
}

.stat-value {
    font-size: 30px;
    font-weight: bold;
    color: #0f766e;
}

.alert.delete {
    background: #fee2e2;
    color: #7f1d1d;
    border: 1px solid #fecaca;
}