﻿
/* ====== Base ====== */
.admin-register {
    direction: rtl;
    font-family: IRANSans, Vazirmatn, Segoe UI, Tahoma, sans-serif;
    color: #1f2937;
    padding: 24px;
    background: #f8fafc;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

.card {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 10px 18px rgba(2, 6, 23, .08);
    overflow: hidden;
    border: 1px solid #eef2f7;
}

/* ====== Header ====== */
.header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: linear-gradient(92deg,#0ea5e9 0%, #6366f1 100%);
    color: #fff;
}

    .header .badge {
        background: rgba(255,255,255,.18);
        padding: 6px 10px;
        border-radius: 999px;
        font-size: 12px;
    }

    .header h1 {
        font-size: 20px;
        margin: 0;
        font-weight: 700;
        letter-spacing: -.2px;
    }

/* ====== Body / Grid ====== */
.body {
    display: grid;
    grid-template-columns: 1.2fr .8fr; /* فرم افقی: فرم در راست، سایدبار در چپ */
    gap: 24px;
    padding: 24px;
}

@media (max-width: 980px) {
    .body {
        grid-template-columns: 1fr;
    }
}

/* ====== Form ====== */
form {
    display: grid;
    gap: 18px;
}

.fieldset {
    background: #ffffff;
    border: 1px solid #e8eef5;
    border-radius: 16px;
    padding: 18px;
}

.legend {
    font-weight: 700;
    font-size: 14px;
    color: #334155;
    margin-bottom: 14px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

@media (max-width: 680px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: grid;
    gap: 8px;
}

label {
    font-size: 13px;
    color: #0f172a;
    font-weight: 600;
}

.hint {
    font-size: 12px;
    color: #64748b;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="file"],
textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #dbe4ee;
    background: #f9fbfd;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
    font-size: 14px;
}

textarea {
    min-height: 88px;
    resize: vertical;
}

    input:focus, textarea:focus {
        background: #fff;
        border-color: #60a5fa;
        box-shadow: 0 0 0 4px rgba(96,165,250,.15);
    }

.switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

    .switch input[type="checkbox"] {
        display: none;
    }

    .switch .track {
        width: 48px;
        height: 28px;
        background: #e2e8f0;
        border-radius: 999px;
        position: relative;
        transition: .2s;
        border: 1px solid #cbd5e1;
    }

    .switch .thumb {
        width: 22px;
        height: 22px;
        background: #fff;
        border-radius: 999px;
        position: absolute;
        top: 2px;
        right: 2px;
        box-shadow: 0 2px 6px rgba(2,6,23,.15);
        transition: right .2s ease, background .2s ease;
    }

    .switch input:checked + .track {
        background: #22c55e;
        border-color: #16a34a;
    }

        .switch input:checked + .track .thumb {
            right: 24px;
            background: #fff;
        }

/* ====== Actions ====== */
.actions {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    align-items: center;
}

.btn {
    border: 0;
    outline: 0;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    transition: transform .05s ease, box-shadow .15s ease, background .2s ease;
}

    .btn:active {
        transform: translateY(1px);
    }

.btn-primary {
    background: linear-gradient(92deg,#2563eb 0%, #22d3ee 100%);
    color: #fff;
    box-shadow: 0 8px 16px rgba(37,99,235,.22);
}

    .btn-primary:hover {
        filter: brightness(1.04);
    }

.btn-ghost {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #e2e8f0;
}

/* ====== Alert & Validation ====== */
.alert {
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid transparent;
    font-size: 14px;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

.alert-danger {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.validation-summary-errors ul {
    margin: 0;
    padding-right: 18px;
}

.field-validation-error {
    color: #dc2626;
    font-size: 12px;
}

.input-validation-error {
    border-color: #f87171 !important;
    background: #fff !important;
}

/* ====== Sidebar ====== */
.sidebar {
    position: sticky;
    top: 16px;
    display: grid;
    gap: 16px;
    height: fit-content;
}

.tip {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
}

    .tip h4 {
        margin: 0 0 8px;
        font-size: 14px;
        color: #0f172a;
    }

    .tip p {
        margin: 0;
        font-size: 13px;
        color: #475569;
    }

/* ====== Image preview ====== */
.avatar-preview {
    display: flex;
    align-items: center;
    gap: 14px;
}

    .avatar-preview img {
        width: 72px;
        height: 72px;
        object-fit: cover;
        border-radius: 14px;
        border: 1px solid #e2e8f0;
        background: #f8fafc;
    }

.muted {
    color: #6b7280;
    font-size: 12px;
}

