/* Tumaini Cyber Admin CSS */
:root {
    --bg: #0b1220;
    --surface: rgba(15, 23, 42, 0.95);
    --surface-strong: rgba(19, 32, 59, 0.98);
    --text: #ecf2ff;
    --muted: #97a5c0;
    --primary: #f64b70;
    --primary-soft: #f99ba8;
    --accent: #3b8bff;
    --border: rgba(255,255,255,0.08);
    --shadow: 0 18px 55px rgba(0,0,0,0.24);
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, sans-serif; color: var(--text); background: radial-gradient(circle at top, rgba(59, 139, 255, 0.12), transparent 30%), radial-gradient(circle at bottom right, rgba(246, 75, 112, 0.14), transparent 25%), #08101f; }

.admin-layout { display: flex; min-height: 100vh; }
.sidebar { width: 260px; background: linear-gradient(180deg, rgba(246,75,112,0.95), rgba(59,139,255,0.95)); padding: 32px 20px; position: sticky; top: 0; height: 100vh; color: #fff; display: flex; flex-direction: column; }
.sidebar .brand { margin-bottom: 24px; }
.sidebar .brand h2 { margin: 0; font-size: 1.8rem; letter-spacing: 0.06em; }
.sidebar .brand small { color: rgba(255,255,255,0.88); }
.sidebar nav { overflow-y: auto; max-height: calc(100vh - 120px); padding-right: 8px; }
.sidebar nav::-webkit-scrollbar { width: 8px; }
.sidebar nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 999px; }
.sidebar nav a { display: block; margin: 12px 0; padding: 12px 16px; border-radius: 14px; color: #fff; text-decoration: none; transition: background 0.25s ease; }
.sidebar nav a:hover, .sidebar nav a.active { background: rgba(255,255,255,0.14); }

.main-shell { flex: 1; padding: 28px 30px; }
.settings-form { display: grid; gap: 24px; }
.settings-form .panel { padding: 28px; }
.settings-form .panel header h3 { margin-bottom: 6px; }
.settings-form .panel p { color: var(--muted); margin-top: 0; margin-bottom: 18px; }
.settings-form .slide-editor-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.settings-form .hero-slide-card { box-shadow: 0 16px 40px rgba(0,0,0,0.18); width: 100%; min-width: 0; background: rgba(255,255,255,0.05); }
.settings-form .hero-slide-card input[type="file"] { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.14); }
.settings-form .hero-slide-card input[type="text"], .settings-form .hero-slide-card select { background: rgba(255,255,255,0.06); }
.settings-form .hero-slide-card .hero-thumb { margin-bottom: 12px; border-radius: 20px; }
.settings-form .hero-slide-card label { margin-top: 12px; color: var(--muted); }
.settings-form .hero-slide-card .form-grid-small { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.settings-form .hero-slide-card .form-grid-small > div { min-width: 0; }
.sidebar { width: 260px; background: linear-gradient(180deg, rgba(246,75,112,0.95), rgba(59,139,255,0.95)); padding: 32px 20px; position: sticky; top: 0; height: 100vh; color: #fff; display: flex; flex-direction: column; overflow: hidden; }
.sidebar nav { flex: 1; overflow-y: auto; max-height: calc(100vh - 120px); padding-right: 8px; }
.sidebar nav::-webkit-scrollbar { width: 8px; }
.sidebar nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 999px; }
.sidebar nav a { display: block; margin: 10px 0; padding: 12px 16px; border-radius: 14px; color: #fff; text-decoration: none; transition: background 0.25s ease; }
.sidebar nav a:hover, .sidebar nav a.active { background: rgba(255,255,255,0.14); }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; gap: 16px; }
.search-bar input { width: 100%; max-width: 420px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); color: var(--text); padding: 12px 16px; border-radius: 14px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }

.admin-message {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

.admin-message.success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.admin-message.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.profile-pill { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,0.08); padding: 10px 14px; border-radius: 999px; }
.profile-pill span { display: block; font-weight: 600; }
.profile-pill small { color: var(--muted); }
.profile-avatar { width: 42px; height: 42px; border-radius: 999px; object-fit: cover; border: 1px solid rgba(255,255,255,0.16); }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 28px; padding: 26px; box-shadow: var(--shadow); margin-bottom: 24px; }
.panel header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 16px; }
.panel h2 { margin: 0; font-size: 1.35rem; }
.dash-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); margin-bottom: 24px; }
.card { padding: 24px 22px; border-radius: 26px; color: #fff; min-height: 160px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 12px; font-size: 1rem; color: rgba(255,255,255,0.88); }
.card p { margin: 0; font-size: 2.5rem; font-weight: 700; }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

.services-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 24px;
    width: 100%;
}

.service-item {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    border-radius: 24px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transition: all 0.25s ease;
    min-width: 0;
}

.service-item:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.18);
}

.service-thumbnail {
    width: 100%;
    height: 150px;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
}

.service-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.03);
    border: 1px dashed rgba(255,255,255,0.12);
    color: var(--muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.service-content {
    flex: 1;
}

.service-item h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.95);
    line-height: 1.3;
}

.service-item h4 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    color: rgba(255,255,255,0.95);
    line-height: 1.3;
}

.service-item > p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.5;
    font-size: 0.95rem;
}

.service-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge.status-published {
    background: rgba(59, 139, 255, 0.18);
    color: #a8d5ff;
}

.badge.status-draft {
    background: rgba(255, 180, 0, 0.18);
    color: #ffd89b;
}

.badge.sort-order {
    background: rgba(255,255,255,0.08);
    color: var(--muted);
}

.service-actions {
    display: flex;
    gap: 10px;
}

.service-actions .btn {
    flex: 1;
    padding: 10px 14px;
    font-size: 0.9rem;
    border-radius: 12px;
}

.btn.small {
    padding: 8px 12px;
    font-size: 0.85rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: var(--text);
    font-size: 0.95rem;
}

.form-group textarea {
    resize: vertical;
}

.form-note {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.85rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 740px; }
thead tr { color: var(--muted); text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.08em; }
th, td { padding: 16px 14px; border-bottom: 1px solid rgba(255,255,255,0.08); }
tbody tr:hover { background: rgba(255,255,255,0.04); }
button, select, input, textarea { font: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 14px; padding: 12px 18px; cursor: pointer; transition: transform 0.15s ease, background 0.2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: #3b8bff; color: #fff; }
.btn-secondary { background: rgba(255,255,255,0.08); color: #fff; }
.btn-danger { background: #ff5264; color: #fff; }
.alert { border-radius: 16px; padding: 16px 20px; margin-bottom: 18px; }
.alert-success { background: rgba(59,139,255,0.14); color: #d6edff; }
.alert-error { background: rgba(255,82,100,0.18); color: #ffd7da; }

.auth-page { min-height: 100vh; display: grid; place-items: center; }
.auth-panel { width: min(460px,calc(100% - 40px)); padding: 36px; background: rgba(10,18,32,0.96); border: 1px solid rgba(255,255,255,0.08); border-radius: 28px; box-shadow: var(--shadow); }
.auth-brand h1 { margin: 0 0 6px; font-size: 2rem; }
.auth-brand p { margin: 0 0 24px; color: var(--muted); }
.auth-panel label { display: block; margin-top: 18px; color: var(--muted); }
.auth-panel input { width: 100%; margin-top: 10px; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.05); color: var(--text); }
.auth-panel .btn { width: 100%; margin-top: 24px; }

input, select, textarea { width: 100%; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); color: var(--text); border-radius: 14px; padding: 14px 16px; margin-top: 8px; }
textarea { resize: vertical; }
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); }
.image-preview { display: block; width: 120px; height: auto; margin-bottom: 12px; border-radius: 18px; border: 1px solid rgba(255,255,255,0.12); }
.table-thumb { width: 60px; height: 48px; object-fit: cover; border-radius: 14px; border: 1px solid rgba(255,255,255,0.12); }
.table-thumb.placeholder { display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 48px; background: rgba(255,255,255,0.05); color: var(--muted); font-size: 0.8rem; border-radius: 14px; }
.hero-thumb-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); margin-top: 16px; }
.hero-thumb { position: relative; border-radius: 22px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.03); }
.hero-thumb img { width: 100%; height: 140px; object-fit: cover; display: block; }
.hero-thumb .placeholder { display: flex; align-items: center; justify-content: center; min-height: 140px; color: var(--muted); font-size: 0.95rem; background: rgba(255,255,255,0.04); }
.hero-thumb .btn.small { position: absolute; right: 12px; bottom: 12px; padding: 8px 12px; font-size: 0.85rem; }
.slide-editor-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin-top: 16px; }
.hero-slide-card { display: grid; gap: 16px; padding: 22px; border-radius: 26px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.05); width: 100%; }
.hero-slide-card label { display: block; color: var(--muted); font-size: 0.95rem; margin-bottom: 6px; }
.hero-slide-card input[type="file"], .hero-slide-card input[type="text"], .hero-slide-card select { width: 100%; }
.hero-slide-card input[type="file"] { padding: 12px 14px; border-radius: 16px; }
.hero-slide-card input[type="text"], .hero-slide-card select { margin-top: 6px; }
.hero-slide-card .form-grid-small { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.hero-slide-card .form-grid-small > div { min-width: 0; }

.modal { position: fixed; inset: 0; background: rgba(3,6,15,0.7); display: flex; align-items: flex-start; justify-content: center; padding: 18px; z-index: 50; overflow-y: auto; }
.modal.hidden { display: none; }
.modal-panel { width: min(720px,100%); max-height: calc(100vh - 48px); background: var(--surface-strong); border-radius: 28px; padding: 24px; box-shadow: var(--shadow); overflow-y: auto; }
.big-modal { max-width: 920px; }
.modal-panel header { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; background: inherit; padding-top: 4px; padding-bottom: 12px; z-index: 2; }
.modal-panel h3 { margin: 0; }
.close { background: transparent; color: var(--text); border: none; font-size: 1.5rem; cursor: pointer; }

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

.modal-panel .form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.95rem;
}

.modal-panel .form-group input,
.modal-panel .form-group textarea,
.modal-panel .form-group select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: var(--text);
    font-size: 0.95rem;
}

.modal-panel .form-group textarea {
    resize: vertical;
}

.modal-panel .form-note {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.85rem;
}

.modal-panel .form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.modal-panel .modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

@media (max-width: 960px) {
    .admin-layout { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: relative; }
    .main-shell { padding: 20px; }
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .service-item {
        flex-direction: row;
        gap: 14px;
    }
    .service-thumbnail {
        width: 120px;
        height: 120px;
        flex-shrink: 0;
    }
    .service-content {
        min-width: 0;
    }
    .service-actions {
        flex-direction: column;
        width: 100%;
    }
    .modal-panel {
        width: calc(100% - 36px);
        margin: 0 18px;
    }
    .modal-panel .form-row {
        grid-template-columns: 1fr;
    }
}
