/* ========== BASE STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Светлая тема (по умолчанию) */
    --bg: #fff8f0;
    --card-bg: #ffffff;
    --primary: #ff6b35;
    --secondary: #f7931e;
    --accent: #ffc857;
    --text: #2d3436;
    --text-secondary: #636e72;
    --shadow: rgba(255, 107, 53, 0.2);
    --shadow-sm: rgba(0, 0, 0, 0.05);
}

/* Тёмная тема */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1a1a1a;
        --card-bg: #2d2d2d;
        --primary: #ff8c5a;
        --secondary: #ffb347;
        --accent: #ffd98a;
        --text: #f5f5f5;
        --text-secondary: #b8b8b8;
        --shadow: rgba(255, 140, 90, 0.3);
        --shadow-sm: rgba(0, 0, 0, 0.3);
    }
}

body {
    font-family: 'Nunito', sans-serif;
    overflow-x: hidden;
    background: var(--bg);
    min-height: 100vh;
    color: var(--text);
    line-height: 1.6;
}

.logo-font {
    font-family: 'Orbitron', sans-serif;
}

.mono-font {
    font-family: 'JetBrains Mono', monospace;
}

/* ========== COMMON ========== */
.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-6 {
    margin-bottom: 2.5rem;
}

.mb-8 {
    margin-bottom: 3.5rem;
}

@media (min-width: 768px) {
    .mb-2 {
        margin-bottom: 1rem;
    }

    .mb-4 {
        margin-bottom: 2rem;
    }

    .mb-6 {
        margin-bottom: 3rem;
    }

    .mb-8 {
        margin-bottom: 4rem;
    }
}

.mt-2 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mt-5 {
    margin-top: 2.5rem;
}

.mt-6 {
    margin-top: 3rem;
}

.mt-8 {
    margin-top: 4rem;
}

/* ========== MAIN CONTENT ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    padding: 2rem 1rem;
}

@media (min-width: 768px) {
    .container {
        padding: 4rem 2rem;
    }
}

/* Header with cover image */
.header {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow:
        0 20px 60px rgba(255, 107, 53, 0.2),
        0 5px 15px rgba(0, 0, 0, 0.1);
}

.cover-image {
    width: 100%;
    height: 100%;
    background-image:
        url('/img/hero.png'),
        linear-gradient(135deg,
            #ff6b35 0%,
            #f7931e 25%,
            #ffc857 50%,
            #ff9a76 75%,
            #ff6b35 100%);
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

@media (prefers-color-scheme: dark) {
    .cover-image {
        background-image:
            url('/img/hero.png'),
            linear-gradient(135deg,
                #ff8c5a 0%,
                #ffb347 25%,
                #ffd98a 50%,
                #ffb8a0 75%,
                #ff8c5a 100%);
    }
}

.cover-image::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 200, 87, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 107, 53, 0.3) 0%, transparent 50%);
    animation: coverFlow 20s ease-in-out infinite;
}

@keyframes coverFlow {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(-50px, -50px) rotate(180deg);
    }
}

.cover-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    width: 90%;
}

.cover-text h1 {
    font-family: 'Comfortaa', cursive;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    color: white;
    text-shadow:
        0 4px 8px rgba(0, 0, 0, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

/* Content sections */
.content {
    color: var(--text);
    background: var(--card-bg);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow:
        0 10px 40px var(--shadow),
        0 2px 8px var(--shadow-sm);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.content h2 {
    font-family: 'Comfortaa', sans-serif;
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    color: var(--primary);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.content h1 {
    font-family: 'Comfortaa', sans-serif;
    font-size: clamp(2rem, 6vw, 3rem);
    color: var(--primary);
    margin-bottom: 2rem;
}

.content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

.service-list {
    list-style: none;
    margin: 1.5rem 0;
}

.service-list li {
    font-size: 1.1rem;
    color: var(--text);
    padding: 0.8rem 0;
    padding-left: 2rem;
    position: relative;
    line-height: 1.6;
}

.service-list li::before {
    content: '●';
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-size: 1.5rem;
    line-height: 1;
}

.service-list li strong {
    color: var(--primary);
    font-weight: 700;
}

.content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.content a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.content a:hover {
    border-bottom-color: var(--primary);
}

/* Button group */
.button-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 3rem;
    padding: 2rem;
}

.btn {
    font-family: 'Nunito', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn.primary:hover {
    transform: translateY(-3px);
    box-shadow:
        0 8px 25px rgba(255, 107, 53, 0.4),
        0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn.secondary {
    background: var(--card-bg);
    color: var(--primary);
    border: 3px solid var(--primary);
}

.btn.secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow:
        0 8px 25px rgba(255, 107, 53, 0.3),
        0 4px 10px var(--shadow-sm);
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        height: 250px;
        border-radius: 16px;
        margin-bottom: 2rem;
    }

    .cover-text h1 {
        font-size: 2rem;
    }

    .content {
        padding: 1.5rem;
    }

    .button-group {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }

    .btn {
        width: 100%;
        text-align: center;
        padding: 1rem 1.5rem;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.form-navigation {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

@media (max-width: 480px) {
    .form-navigation {
        flex-direction: column;
    }

    .form-navigation .btn {
        width: 100%;
    }
}

#background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}



.page-content ul,
.page-content ol {
    padding-left: 20px;
}

.page-content li {
    margin-bottom: 1em;
    line-height: 1.5;
}

.page-content code {
    padding: 2px 5px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
}

/* Custom styles for form input fields */
.form-input {
    width: 100%;
    padding: 12px;
    background-color: transparent;
    border: 1px solid var(--primary);
    border-radius: 4px;
    color: var(--text);
    font-size: 1rem;
    font-family: 'JetBrains Mono', monospace;
}

fieldset>.form-input,
fieldset>.form-input:focus,
fieldset>.form-input:focus-visible {
    border: none;
    outline: none;
}

/* Custom Radio Buttons */
input[type="radio"] {
    /* Hide native radio button */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease-in-out;
    vertical-align: middle;
}

input[type="radio"]:hover {
    border-color: var(--secondary);
}

input[type="radio"]:checked {
    border-color: var(--primary);
    background-color: var(--primary);
    /* Fill with primary color when checked */
}

input[type="radio"]:checked::before {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    background-color: var(--card-bg);
    /* Inner circle color */
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Custom Checkboxes */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid var(--primary);
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease-in-out;
    vertical-align: middle;
}

input[type="checkbox"]:hover {
    border-color: var(--secondary);
}

input[type="checkbox"]:checked {
    border-color: var(--primary);
    background-color: var(--primary);
}

input[type="checkbox"]:checked::before {
    content: '✓';
    display: block;
    color: var(--card-bg);
    font-size: 14px;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1;
}

/* Style the label next to the radio button for better alignment */
.form-step fieldset label {
    display: flex;
    /* Use flexbox for alignment */
    align-items: center;
    /* Center items vertically */
    margin-bottom: 10px;
    /* Adjust spacing between radio options */
    cursor: pointer;
    color: var(--text);
    /* Ensure label text color is consistent */
}

/* Adjust legend spacing */
.form-step legend {
    margin-bottom: 20px;
    color: var(--primary);
    /* Make legend color consistent */
    font-size: 1.2rem;
}

/* ========== ADMIN TABLES & UI ========== */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--shadow-sm);
}

.admin-table th {
    color: var(--primary);
    font-family: 'Comfortaa', cursive;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-table tr:hover {
    background-color: var(--shadow-sm);
}

.actions-col {
    text-align: right !important;
}

.btn.small {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

.btn.warning {
    background: var(--accent);
    color: var(--text);
}

.btn.danger {
    background: #ff4757;
    color: white;
}

.badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    background: var(--primary);
    color: white;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
}

.bg-light-muted {
    background-color: var(--shadow-sm);
}

.bg-info-dim {
    background-color: rgba(0, 184, 148, 0.1);
}

.border-info-dim {
    border: 1px solid rgba(0, 184, 148, 0.3);
}

.section-card {
    margin-bottom: 2rem;
}

.audit-log-item {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--shadow-sm);
    padding-bottom: 0.5rem !important;
}

.ip-info code {
    background: var(--shadow-sm);
    padding: 2px 4px;
    border-radius: 4px;
}

.alert.success {
    background: rgba(0, 184, 148, 0.2);
    border-left: 5px solid #00b894;
    padding: 1rem;
}

.alert.danger {
    background: rgba(255, 71, 87, 0.2);
    border-left: 5px solid #ff4757;
    padding: 1rem;
}

.alert.warning {
    background: rgba(255, 200, 87, 0.2);
    border-left: 5px solid var(--accent);
    padding: 1rem;
}

.alert.info {
    background: rgba(116, 185, 255, 0.2);
    border-left: 5px solid #74b9ff;
    padding: 1rem;
}

/* ========== SERVICE CARDS ========== */
.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.service-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 3px solid var(--primary);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px var(--shadow-sm);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow);
    border-color: var(--secondary);
}

.service-icon {
    font-size: 2.5rem;
    margin-right: 1.2rem;
}

.service-info h3 {
    font-family: 'Comfortaa', sans-serif;
    margin-top: 0;
    margin-bottom: 0.2rem;
    color: var(--primary);
    font-size: 1.2rem;
}

.service-info p {
    font-size: 0.9rem;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.4;
}

.bg-white-opacity {
    background: rgba(255, 255, 255, 0.1);
}

@media (prefers-color-scheme: dark) {
    .bg-white-opacity {
        background: rgba(0, 0, 0, 0.2);
    }
}

.form-error {
    color: #ff4757;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-weight: 600;
}

.form-hint,
.help-text {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.3rem;
    line-height: 1.4;
}

.alert .btn {
    margin-top: 1rem;
}

@media (max-width: 480px) {
    .alert .btn {
        width: 100%;
        display: block;
    }

    .profile-header h1 {
        font-size: 1.8rem;
    }
}