/* 
   Promptbix (AI) - Admin Panel Design
   Version 3.2 (Refined Typography)
*/
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* --- Color Palette (Same as Main Site) --- */
    --color-bg-deep: #0f0518;
    --color-bg-panel: #1a0b2e;
    --color-primary: #9c2db6;
    --color-primary-dark: #58207d;
    --color-accent: #fa4305;
    --color-secondary: #368cca;
    --color-highlight: #fa9407;

    --color-text-main: #ffffff;
    --color-text-muted: #b0a0c0;

    /* --- Effects --- */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-backdrop: blur(16px);
    --radius-lg: 20px;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--color-bg-deep);
    color: var(--color-text-main);
    margin: 0;
    padding: 0;
    /* Background Pattern */
    background-image:
        radial-gradient(circle at 10% 20%, rgba(88, 32, 125, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(54, 140, 202, 0.1) 0%, transparent 40%);
    background-attachment: fixed;
}

/* --- Login Page --- */
.login-wrapper {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-box {
    background: var(--color-bg-panel);
    border: var(--glass-border);
    padding: 60px 40px;
    border-radius: var(--radius-lg);
    width: 380px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.login-heading {
    margin-bottom: 30px;
    font-weight: 800;
    font-size: 2rem;
}

.login-icon {
    color: var(--color-primary);
}

.login-password {
    margin-bottom: 20px;
}

.login-error {
    color: #ff6b6b;
    font-size: 0.9rem;
    display: none;
    margin-bottom: 15px;
}

.login-btn-padding {
    padding: 15px;
}

.back-link {
    display: block;
    margin-top: 20px;
    color: #aaa;
    font-size: 0.9rem;
    text-decoration: none;
}

/* --- Dashboard Layout --- */
.dashboard-layout {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 280px;
    background: rgba(26, 11, 46, 0.9);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    padding: 40px 20px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.main-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

/* --- Navigation --- */
.brand-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-btn {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: 0.3s;
    font-weight: 500;
}

.nav-btn:hover,
.nav-btn.active {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.nav-btn.active {
    border-left: 3px solid var(--color-accent);
    background: linear-gradient(90deg, rgba(250, 67, 5, 0.1), transparent);
}

.nav-icon {
    width: 20px;
}

/* --- Components --- */
.glass-panel {
    background: var(--glass-bg);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.page-title {
    font-size: 1.8rem;
    margin: 0;
    line-height: 1;
}

/* Inputs & Form Elements */
input,
select,
textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px 15px;
    border-radius: 8px;
    font-family: inherit;
    margin-bottom: 10px;
    font-size: 0.95rem;
    transition: 0.3s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-secondary);
    background: rgba(0, 0, 0, 0.5);
}

.edit-header-input {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-secondary);
    padding: 5px;
    width: auto;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
}

.edit-header-input:focus {
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--color-secondary);
}

.category-select {
    padding: 10px 15px;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.2);
    width: 250px;
    border-color: rgba(255, 255, 255, 0.1);
}

.site-name-input {
    opacity: 0.6;
    cursor: not-allowed;
}

.json-textarea {
    font-family: monospace;
    font-size: 0.85rem;
    color: #00e676;
    background: #000;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(90deg, var(--color-accent), var(--color-highlight));
    color: #fff;
    box-shadow: 0 5px 15px rgba(250, 67, 5, 0.3);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-danger {
    background: rgba(255, 0, 0, 0.1);
    color: #ffadad;
    border: 1px solid rgba(255, 0, 0, 0.2);
}

.btn-danger:hover {
    background: rgba(255, 0, 0, 0.3);
    color: #fff;
}

.btn-save {
    background: #00c853;
    color: #fff;
    width: 100%;
    padding: 15px;
    font-size: 1rem;
    margin-top: auto;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-save:hover {
    background: #00e676;
    box-shadow: 0 5px 20px rgba(0, 230, 118, 0.3);
}

.btn-save:disabled {
    background: #555;
    cursor: not-allowed;
}

.visit-site-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.9rem;
}

.btn-logout {
    border: none;
    padding: 10px;
}

/* Status Tags & Icons */
.status-tag {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
}

.status-locked {
    background: rgba(255, 68, 68, 0.15);
    color: #ff4444;
    border: 1px solid rgba(255, 68, 68, 0.3);
}

.status-purple {
    background: rgba(156, 45, 182, 0.15);
    color: #d156f0;
    border: 1px solid rgba(156, 45, 182, 0.3);
}

.status-open {
    background: rgba(54, 140, 202, 0.15);
    color: var(--color-secondary);
    border: 1px solid rgba(54, 140, 202, 0.3);
}


.icon-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
}

.locked-bg {
    background: rgba(255, 68, 68, 0.1);
    color: #ff4444;
}

.open-bg {
    background: rgba(54, 140, 202, 0.1);
    color: var(--color-secondary);
}

.live-sync-indicator {
    font-size: 0.75rem;
    color: #666;
    margin-top: 10px;
}

.dot-green {
    color: #00c853;
    font-size: 6px;
    vertical-align: middle;
    margin-right: 4px;
}

.pass-reveal {
    font-size: 0.8rem;
    color: #eab308;
    background: rgba(234, 179, 8, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 5px;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #1a0b2e;
    color: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border-left: 5px solid #fff;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    z-index: 9999;
}

.toast-success {
    border-color: #00c853;
}

.toast-error {
    border-color: #ff3d00;
}

/* Utilities */
.w-full {
    width: 100%;
}

.mt-auto {
    margin-top: auto;
}

.text-center {
    text-align: center;
}

.d-none {
    display: none !important;
}

.d-flex {
    display: flex;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.gap-10 {
    gap: 10px;
}

.gap-20 {
    gap: 20px;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.m-0 {
    margin: 0;
}

.mt-5 {
    margin-top: 5px;
}

.fs-08 {
    font-size: 0.8rem;
}

.text-muted {
    color: var(--color-text-muted);
}

.label-sm {
    font-size: 0.8rem;
    color: #888;
    display: block;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media(max-width: 1024px) {
    .dashboard-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 20px;
    }

    .page-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}