/* ==== admin/software_edit.php ==== */
body {
    min-height: 100vh;
    background: radial-gradient(circle at top, #1f2937, #020617);
    color: #e5e7eb;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.card {
    background: rgba(15, 23, 42, 0.96);
    border-radius: 18px;
    padding: 22px 20px 18px;
    box-shadow: 0 24px 60px rgba(0,0,0,.6);
    border: 1px solid rgba(148,163,184,0.4);
    backdrop-filter: blur(12px);
    width: 100%;
    max-width: 720px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.title {
    font-size: 20px;
    font-weight: 600;
}

a.link {
    font-size: 13px;
    color: #60a5fa;
    text-decoration: underline;
}

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

label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
}

input[type="text"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #4b5563;
    background: #020617;
    color: #e5e7eb;
    font-size: 13px;
}

textarea {
    min-height: 70px;
    resize: vertical;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    margin-bottom: 12px;
}

.btn {
    margin-top: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background: linear-gradient(90deg, #38bdf8, #22c55e);
    color: #020617;
}

.msg-error {
    font-size: 13px;
    color: #f97373;
    margin-bottom: 8px;
}

.msg-success {
    font-size: 13px;
    color: #4ade80;
    margin-bottom: 8px;
}


/* ==== admin/index.php ==== */
body {
    min-height: 100vh;
    background: radial-gradient(circle at top, #1f2937, #020617);
    color: #e5e7eb;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.card {
    background: rgba(15, 23, 42, 0.96);
    border-radius: 18px;
    padding: 22px 20px 20px;
    box-shadow: 0 24px 60px rgba(0,0,0,.6);
    border: 1px solid rgba(148,163,184,0.4);
    backdrop-filter: blur(12px);
    width: 100%;
    max-width: 720px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.title-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.title {
    font-size: 22px;
    font-weight: 600;
}

.subtitle {
    font-size: 13px;
    color: #9ca3af;
}

.back-link {
    font-size: 13px;
    color: #60a5fa;
    text-decoration: underline;
}

.buttons-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.btn-pill {
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.7);
    background: radial-gradient(circle at top left, rgba(56,189,248,0.18), transparent 55%),
                radial-gradient(circle at bottom right, rgba(34,197,94,0.16), transparent 55%),
                #020617;
    font-size: 13px;
    color: #e5e7eb;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-pill:hover {
    background: radial-gradient(circle at top left, rgba(59,130,246,0.25), transparent 55%),
                radial-gradient(circle at bottom right, rgba(34,197,94,0.2), transparent 55%),
                #020617;
    border-color: rgba(129,140,248,0.9);
    box-shadow: 0 12px 32px rgba(37,99,235,0.5);
    transform: translateY(-1px);
}

.btn-pill.secondary {
    border-color: rgba(148,163,184,0.6);
    background: rgba(15,23,42,0.9);
}

.btn-pill.secondary:hover {
    background: rgba(30,64,175,0.9);
}


/* ==== admin/users_list.php ==== */
body {
    min-height: 100vh;
    background: radial-gradient(circle at top, #1f2937, #020617);
    color: #e5e7eb;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.card {
    background: rgba(15, 23, 42, 0.96);
    border-radius: 18px;
    padding: 22px 20px 18px;
    box-shadow: 0 24px 60px rgba(0,0,0,.6);
    border: 1px solid rgba(148,163,184,0.4);
    backdrop-filter: blur(12px);
    width: 100%;
    max-width: 960px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.title {
    font-size: 20px;
    font-weight: 600;
}

.header-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

a.link {
    font-size: 13px;
    color: #60a5fa;
    text-decoration: underline;
}

.btn-pill {
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.7);
    background: rgba(15,23,42,0.9);
    font-size: 13px;
    color: #e5e7eb;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn-pill:hover {
    background: rgba(37,99,235,0.9);
    border-color: rgba(129,140,248,0.9);
    transform: translateY(-1px);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th,
td {
    padding: 8px 6px;
    border-bottom: 1px solid rgba(55,65,81,0.8);
}

th {
    text-align: left;
    color: #9ca3af;
}

tr:hover td {
    background: rgba(15,23,42,0.8);
}

.badge {
    padding: 2px 6px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.6);
    font-size: 11px;
}

.badge-admin {
    color: #facc15;
}

.badge-user {
    color: #38bdf8;
}

.badge-inactive {
    color: #f97373;
}

.btn-small {
    font-size: 11px;
    color: #60a5fa;
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}


/* ==== admin/software_list.php ==== */
body {
    min-height: 100vh;
    background: radial-gradient(circle at top, #1f2937, #020617);
    color: #e5e7eb;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.card {
    background: rgba(15, 23, 42, 0.96);
    border-radius: 18px;
    padding: 22px 20px 18px;
    box-shadow: 0 24px 60px rgba(0,0,0,.6);
    border: 1px solid rgba(148,163,184,0.4);
    backdrop-filter: blur(12px);
    width: 100%;
    max-width: 960px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.title {
    font-size: 20px;
    font-weight: 600;
}

a.link {
    font-size: 13px;
    color: #60a5fa;
    text-decoration: underline;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th,
td {
    padding: 8px 6px;
    border-bottom: 1px solid rgba(55,65,81,0.8);
}

th {
    text-align: left;
    color: #9ca3af;
}

tr:hover td {
    background: rgba(15,23,42,0.8);
}

.badge {
    padding: 2px 6px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.6);
    font-size: 11px;
}

.badge-active {
    color: #22c55e;
}

.badge-soon {
    color: #eab308;
}

.badge-disabled {
    color: #f97373;
}

.btn-small {
    font-size: 11px;
    color: #60a5fa;
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}


/* ==== dashboard.php ==== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    min-height: 100vh;
    background: radial-gradient(circle at top, #1f2937, #020617);
    color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.dashboard-wrapper {
    width: 100%;
    max-width: 1080px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    gap: 12px;
}

.dashboard-title-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dashboard-title {
    font-size: 24px;
    font-weight: 600;
}

.dashboard-subtitle {
    font-size: 13px;
    color: #9ca3af;
}

.logout-button {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(248, 113, 113, 0.85);
    background: linear-gradient(90deg, #f97373, #ef4444);
    color: #0b1120;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

.logout-button:hover {
    background: linear-gradient(90deg, #ef4444, #b91c1c);
    border-color: rgba(248, 113, 113, 1);
    box-shadow: 0 10px 26px rgba(248, 113, 113, 0.5);
    transform: translateY(-1px);
}

.dashboard-card {
    background: rgba(15, 23, 42, 0.96);
    border-radius: 18px;
    padding: 20px 18px 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
    border: 1px solid rgba(148, 163, 184, 0.4);
    backdrop-filter: blur(14px);
}

.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.software-item {
    position: relative;
    padding: 14px 13px 13px;
    border-radius: 14px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.14), transparent 55%),
                radial-gradient(circle at bottom right, rgba(34, 197, 94, 0.12), transparent 55%),
                #020617;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.software-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(56, 189, 248, 0.35);
    border-color: rgba(96, 165, 250, 0.95);
}

.software-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.software-name {
    font-size: 15px;
    font-weight: 500;
}

.software-tag {
    font-size: 11px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.7);
    color: #9ca3af;
    white-space: nowrap;
}

.software-desc {
    font-size: 12px;
    color: #9ca3af;
}

.software-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.software-status {
    font-size: 11px;
    color: #22c55e;
}

.software-status-soon {
    color: #eab308;
}

.software-link {
    font-size: 11px;
    text-decoration: underline;
    color: #38bdf8;
}

.dashboard-footer {
    margin-top: 12px;
    font-size: 11px;
    color: #6b7280;
    text-align: right;
}

.admin-link {
    font-size: 11px;
    color: #60a5fa;
    text-decoration: underline;
    margin-top: 4px;
}

@media (max-width: 640px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-footer {
        text-align: left;
    }
}
.dashboard-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logout-form {
    margin: 0;
}

.admin-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: radial-gradient(circle at top left, rgba(56,189,248,0.18), transparent 55%),
                radial-gradient(circle at bottom right, rgba(34,197,94,0.16), transparent 55%),
                #020617;
    font-size: 13px;
    color: #e5e7eb;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

.admin-button:hover {
    background: radial-gradient(circle at top left, rgba(59,130,246,0.25), transparent 55%),
                radial-gradient(circle at bottom right, rgba(34,197,94,0.22), transparent 55%),
                #020617;
    border-color: rgba(129,140,248,0.9);
    box-shadow: 0 10px 26px rgba(37,99,235,0.45);
    transform: translateY(-1px);
}


/* Профіль */

.profile-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.profile-section {
    padding-top: 4px;
}

.profile-section-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #e5e7eb;
}

.alert {
    padding: 8px 11px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 10px;
}

.alert-error {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.55);
    color: #fecaca;
}

.alert-success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.55);
    color: #bbf7d0;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 999px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background: linear-gradient(90deg, #38bdf8, #22c55e);
    color: #020617;
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(56, 189, 248, 0.4);
    opacity: 0.96;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
    opacity: 0.9;
}

/* маленькая текстовая ссылка в сабтайтле */
.link-inline {
    color: #38bdf8;
    text-decoration: none;
    font-size: 13px;
}

.link-inline:hover {
    text-decoration: underline;
}

/* адаптив для мобилки */
@media (max-width: 768px) {
    .profile-sections {
        grid-template-columns: 1fr;
    }
}


/* Панель поиска по софту на дашборде */
.dashboard-search {
    margin: 0 0 14px 0;
    display: flex;
    justify-content: flex-end;
}

.search-input {
    width: 260px;
    max-width: 100%;
    padding: 8px 11px;
    font-size: 13px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.search-input::placeholder {
    color: #6b7280;
}

.search-input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35);
    background: #020617;
}

@media (max-width: 640px) {
    .dashboard-search {
        justify-content: stretch;
    }

    .search-input {
        width: 100%;
    }
}


/* ==== index.php ==== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, #1f2937, #020617);
    color: #e5e7eb;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 16px;
}

.login-card {
    background: rgba(15, 23, 42, 0.96);
    border-radius: 18px;
    padding: 28px 26px 26px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
    border: 1px solid rgba(148, 163, 184, 0.4);
    backdrop-filter: blur(12px);
}

.login-header {
    margin-bottom: 22px;
    text-align: center;
}

.login-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
}

.login-subtitle {
    font-size: 13px;
    color: #9ca3af;
}

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

.form-label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: #e5e7eb;
}

.form-input {
    width: 100%;
    padding: 10px 11px;
    font-size: 14px;
    border-radius: 10px;
    border: 1px solid #4b5563;
    background: #020617;
    color: #e5e7eb;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.form-input::placeholder {
    color: #6b7280;
}

.form-input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35);
    background: #020617;
}

.error-message {
    font-size: 13px;
    color: #f97373;
    margin-bottom: 10px;
    text-align: center;
}

/* Общий стиль для кнопок входа и профиля */
.login-button,
.profile-button {
    padding: 11px 14px;
    border-radius: 999px;
    border: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    background: linear-gradient(90deg, #38bdf8, #22c55e);
    color: #020617;
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

/* Логин-кнопка — как и была: на всю ширину */
.login-button {
    width: 100%;
    margin-top: 6px;
}

/* Кнопки в профиле — компактные */
.profile-button {
    width: auto;
    padding: 8px 18px;
    margin-top: 4px;
}

/* Ховеры / актив для обеих */
.login-button:hover,
.profile-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(56, 189, 248, 0.35);
    opacity: 0.96;
}

.login-button:active,
.profile-button:active {
    transform: translateY(0);
    box-shadow: none;
    opacity: 0.9;
}


.login-footer {
    margin-top: 14px;
    font-size: 11px;
    text-align: center;
    color: #6b7280;
}

.form-group-turnstile {
    display: block !important;
    text-align: center;
}

.form-group-turnstile .cf-turnstile {
    display: inline-block;
}

@media (max-width: 480px) {
    .login-card {
        padding: 22px 18px 20px;
        border-radius: 14px;
    }

    .login-title {
        font-size: 20px;
    }
}
