/* ===== ANA SITE - Bootstrap 5 Dark Theme ===== */

body {
    background-color: #0f1117;
    color: #e2e8f0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
}

/* SHARED BUTTONS */
.adm-btn {
    padding: 0.5rem 1.1rem;
    border-radius: 0.5rem;
    font-size: 0.84rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.adm-btn-primary { background: #6366f1; color: #fff; }
.adm-btn-primary:hover { background: #4f46e5; color: #fff; }
.adm-btn-secondary { background: rgba(255,255,255,0.07); color: #94a3b8; border: 1px solid rgba(255,255,255,0.1); }
.adm-btn-secondary:hover { background: rgba(255,255,255,0.12); color: #e2e8f0; }
.adm-btn-danger { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.2); }
.adm-btn-danger:hover { background: rgba(239,68,68,0.25); color: #fca5a5; }
.adm-btn-sm { padding: 0.3rem 0.7rem; font-size: 0.76rem; }

/* SHARED FORM */
.adm-form-label { font-size: 0.8rem; font-weight: 600; color: #94a3b8; margin-bottom: 0.35rem; display: block; }
.adm-form-control { background: #0f1117; border: 1px solid rgba(255,255,255,0.1); border-radius: 0.5rem; color: #e2e8f0; padding: 0.5rem 0.75rem; font-size: 0.85rem; width: 100%; transition: border-color 0.15s; }
.adm-form-control:focus { outline: none; border-color: #6366f1; background: #0f1117; color: #e2e8f0; box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.adm-form-control::placeholder { color: #475569; }
select.adm-form-control option { background: #1e2535; }

/* SHARED BADGES */
.adm-badge { font-size: 0.65rem; font-weight: 700; padding: 0.2rem 0.55rem; border-radius: 2rem; text-transform: uppercase; letter-spacing: 0.3px; }
.adm-badge-admin { background: rgba(239,68,68,0.15); color: #f87171; }
.adm-badge-user  { background: rgba(59,130,246,0.15); color: #60a5fa; }

/* SHARED CARD */
.adm-card { background: #1e2535; border: 1px solid rgba(255,255,255,0.07); border-radius: 0.875rem; padding: 1.25rem; }
.adm-brand-icon { width: 28px; height: 28px; background: #6366f1; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; color: #fff; }
.adm-brand-text { font-size: 0.9rem; font-weight: 700; color: #f1f5f9; letter-spacing: 0.3px; }

/* NAVBAR */
.site-navbar { background: #161b27; border-bottom: 1px solid rgba(255,255,255,0.07); }
.site-navbar .navbar-brand { font-size: 0.95rem; font-weight: 700; color: #f1f5f9 !important; }
.site-navbar .nav-link { color: #64748b !important; font-size: 0.84rem; font-weight: 500; padding: 0.5rem 0.75rem; border-radius: 0.5rem; transition: all 0.15s; }
.site-navbar .nav-link:hover, .site-navbar .nav-link.active { color: #a5b4fc !important; background: rgba(99,102,241,0.12); }
.site-navbar .nav-link i { width: 15px; text-align: center; }
.site-navbar .dropdown-menu { background: #1e2535; border: 1px solid rgba(255,255,255,0.08); border-radius: 0.75rem; padding: 0.4rem; min-width: 200px; }
.site-navbar .dropdown-item { color: #94a3b8 !important; font-size: 0.84rem; border-radius: 0.4rem; padding: 0.5rem 0.75rem; }
.site-navbar .dropdown-item:hover { background: rgba(99,102,241,0.15); color: #a5b4fc !important; }
.site-navbar .dropdown-item.text-danger { color: #f87171 !important; }
.site-navbar .dropdown-item.text-danger:hover { background: rgba(239,68,68,0.12); }
.site-navbar .dropdown-divider { border-color: rgba(255,255,255,0.07); }

/* LAYOUT */
.site-wrapper { min-height: 100vh; background-color: #0f1117; }
.site-container { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }

/* PAGE HEADER */
.site-page-header { margin-bottom: 1.75rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.site-page-header h1 { font-size: 1.35rem; font-weight: 700; color: #f1f5f9; margin: 0; display: flex; align-items: center; gap: 0.6rem; }
.site-page-header p { font-size: 0.85rem; color: #64748b; margin: 0.2rem 0 0; }

/* CARDS */
.site-card { background: #1e2535; border: 1px solid rgba(255,255,255,0.07); border-radius: 0.875rem; padding: 1.25rem; }

/* COUNT BADGE */
.site-count { background: #6366f1; color: #fff; font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.55rem; border-radius: 2rem; }
.site-count-success { background: #10b981; }

/* ICON BUTTONS */
.site-icon-btn { background: none; border: none; padding: 0.4rem; color: #64748b; cursor: pointer; font-size: 0.95rem; border-radius: 0.4rem; transition: all 0.15s; line-height: 1; }
.site-icon-btn:hover { background: rgba(255,255,255,0.07); color: #cbd5e1; }
.site-icon-btn.edit:hover { color: #a5b4fc; }
.site-icon-btn.delete:hover { color: #f87171; }
.site-icon-btn.key { color: #6366f1; }
.site-icon-btn.key-empty { color: #f87171; }

/* MODALS */
.site-modal .modal-content { background: #1e2535; border: 1px solid rgba(255,255,255,0.08); border-radius: 1rem; color: #e2e8f0; }
.site-modal .modal-header { border-bottom: 1px solid rgba(255,255,255,0.07); padding: 1.25rem 1.5rem; }
.site-modal .modal-header .modal-title { font-size: 1.05rem; font-weight: 600; }
.site-modal .modal-body { padding: 1.25rem 1.5rem; }
.site-modal .modal-footer { border-top: 1px solid rgba(255,255,255,0.07); padding: 1rem 1.5rem; }
.site-modal .btn-close { filter: invert(1) grayscale(1) brightness(2); opacity: 0.5; }
.site-modal .btn-close:hover { opacity: 1; }

/* QUICK LINKS */
.site-quick-links { display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: center; margin: 1.5rem 0; }
.site-quick-item { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-decoration: none; color: #64748b; width: 80px; text-align: center; transition: all 0.2s; position: relative; }
.site-quick-item:hover { color: #e2e8f0; transform: translateY(-4px); }
.site-quick-icon { width: 56px; height: 56px; background: #1e2535; border: 1px solid rgba(255,255,255,0.08); border-radius: 1rem; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #6366f1; }
.site-quick-label { font-size: 0.72rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }

/* LIST ITEMS */
.site-list-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0.85rem; border-radius: 0.6rem; background: rgba(255,255,255,0.02); border: 1px solid transparent; transition: all 0.15s; text-decoration: none; color: #cbd5e1; margin-bottom: 0.35rem; }
.site-list-item:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.06); color: #f1f5f9; }

/* TODO BADGES */
.td-badge { font-size: 0.65rem; font-weight: 700; padding: 0.15rem 0.45rem; border-radius: 0.4rem; text-transform: uppercase; letter-spacing: 0.4px; }
.td-badge.high { background: rgba(239,68,68,0.15); color: #ef4444; }
.td-badge.normal { background: rgba(99,102,241,0.15); color: #a5b4fc; }
.td-badge.low { background: rgba(148,163,184,0.15); color: #94a3b8; }

/* VISIBILITY BADGES */
.vis-badge { font-size: 0.65rem; font-weight: 700; padding: 0.2rem 0.55rem; border-radius: 2rem; text-transform: uppercase; letter-spacing: 0.4px; white-space: nowrap; }
.vis-badge.all { background: rgba(99,102,241,0.15); color: #a5b4fc; }
.vis-badge.user { background: rgba(16,185,129,0.15); color: #34d399; }
.vis-badge.admin { background: rgba(239,68,68,0.15); color: #f87171; }

/* NOTE CARD */
.nt-content { font-size: 0.85rem; color: #94a3b8; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* SEARCH */
.site-search { background: #1e2535; border: 1px solid rgba(255,255,255,0.08); border-radius: 2rem; padding: 0.65rem 1.25rem 0.65rem 2.75rem; color: #e2e8f0; font-size: 0.95rem; width: 100%; transition: border-color 0.2s; }
.site-search:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.15); background: #1e2535; color: #e2e8f0; }
.site-search-wrap { position: relative; max-width: 600px; margin: 1.5rem auto; }
.site-search-wrap i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: #475569; }

/* TOAST */
#toast-container { position: fixed; top: 1.5rem; right: 1.5rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none; }
.toast { min-width: 280px; background: #1e2535; border: 1px solid rgba(255,255,255,0.08); color: #e2e8f0; padding: 0.85rem 1rem; border-radius: 0.75rem; display: flex; align-items: center; gap: 0.65rem; pointer-events: auto; animation: toastIn 0.25s ease; position: relative; overflow: hidden; }
.toast::after { content:''; position:absolute; bottom:0; left:0; height:2px; width:100%; animation: toastProg 5s linear forwards; }
.toast-success i { color: #34d399; } .toast-success::after { background: #10b981; }
.toast-error i { color: #f87171; } .toast-error::after { background: #ef4444; }
.toast-info i { color: #60a5fa; } .toast-info::after { background: #3b82f6; }
.toast-content { flex:1; font-size:0.85rem; font-weight:500; }
.toast.hide { animation: toastOut 0.2s ease forwards; }
@keyframes toastIn { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:translateX(0); } }
@keyframes toastOut { to { opacity:0; transform:translateX(20px); } }
@keyframes toastProg { from { width:100%; } to { width:0; } }

/* BOOKMARK NOTE POPUP */
.bm-note-wrap { position: relative; display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.75rem; color: #64748b; margin-top: 0.25rem; cursor: default; max-width: 100%; overflow: visible; }
.bm-note-wrap .bm-note-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.bm-note-popup { display: none; position: absolute; bottom: calc(100% + 8px); left: 0; background: #0f1117; border: 1px solid rgba(99,102,241,0.35); border-radius: 0.6rem; padding: 0.65rem 0.9rem; font-size: 0.8rem; color: #cbd5e1; line-height: 1.6; white-space: pre-wrap; word-break: break-word; min-width: 200px; max-width: 300px; z-index: 9999; box-shadow: 0 8px 28px rgba(0,0,0,0.5); pointer-events: none; }
.bm-note-popup::after { content:''; position:absolute; top:100%; left:14px; border:6px solid transparent; border-top-color: rgba(99,102,241,0.35); }
.bm-note-wrap:hover .bm-note-popup { display: block; }

.cred-preset { background:rgba(99,102,241,0.12); color:#a5b4fc; border:1px solid rgba(99,102,241,0.25); padding:0.25rem 0.65rem; border-radius:2rem; font-size:0.78rem; cursor:pointer; transition:all 0.15s; box-shadow:none; }
.cred-preset:hover { background:rgba(99,102,241,0.25); transform:none; box-shadow:none; }
.cred-preset.active { background:#6366f1; color:#fff; }
