/* Quilr Design System - Brutalist Enterprise */

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #151819; }
::-webkit-scrollbar-thumb { background: #363b3e; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #454a4d; }

/* Spinner */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #2a2f32;
    border-top-color: #70d083;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.spinner-sm {
    width: 20px;
    height: 20px;
    border: 2px solid #2a2f32;
    border-top-color: #70d083;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast animations */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}
.toast-in { animation: slideIn 0.2s ease-out; }
.toast-out { animation: slideOut 0.2s ease-in forwards; }

/* Card hover */
.card-hover { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.card-hover:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }

/* Selected glow */
.selected-glow { box-shadow: 0 0 8px rgba(112, 208, 131, 0.2); }

/* Toggle switch */
.toggle-switch {
    width: 40px;
    height: 20px;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.15s ease;
    flex-shrink: 0;
}
.toggle-switch .toggle-knob {
    position: absolute;
    top: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: left 0.15s ease, right 0.15s ease;
}
.toggle-switch.on { background-color: #70d083; }
.toggle-switch.on .toggle-knob { right: 2px; left: auto; }
.toggle-switch.off { background-color: #363b3e; }
.toggle-switch.off .toggle-knob { left: 2px; right: auto; }

/* DLP Toggle colors */
.toggle-blue { background-color: #3b82f6; }
.toggle-purple { background-color: #8b5cf6; }
.toggle-orange { background-color: #f97316; }
.toggle-gray { background-color: #363b3e; }

/* Typography */
.label-uppercase {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgb(107, 114, 128);
    font-weight: 500;
}

/* Tags / Badges */
.tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
}
.tag-green {
    background: rgba(112, 208, 131, 0.15);
    color: #70d083;
    border: 1px solid rgba(112, 208, 131, 0.3);
}
.tag-red {
    background: rgba(239, 68, 68, 0.1);
    color: rgb(248, 113, 113);
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.tag-yellow {
    background: rgba(234, 179, 8, 0.1);
    color: rgb(250, 204, 21);
    border: 1px solid rgba(234, 179, 8, 0.2);
}
.tag-purple {
    background: rgba(139, 92, 246, 0.1);
    color: rgb(167, 139, 250);
    border: 1px solid rgba(139, 92, 246, 0.2);
}
.tag-blue {
    background: rgba(59, 130, 246, 0.1);
    color: rgb(96, 165, 250);
    border: 1px solid rgba(59, 130, 246, 0.2);
}
.tag-orange {
    background: rgba(249, 115, 22, 0.1);
    color: rgb(251, 146, 60);
    border: 1px solid rgba(249, 115, 22, 0.2);
}

/* Transition defaults */
* { transition-timing-function: ease; }
a, button, input, select, textarea {
    transition-duration: 0.1s;
}

/* Fade in animation */
.fade-in {
    animation: fadeIn 0.2s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Schema tree font */
.schema-tree {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.75rem;
}

/* Input focus glow */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #70d083 !important;
    box-shadow: 0 0 0 2px rgba(112, 208, 131, 0.15);
}

/* SSO Button */
.sso-btn {
    background: transparent;
    border: 1px solid #70d083;
    color: #70d083;
    transition: background-color 0.1s ease;
}
.sso-btn:hover {
    background: rgba(112, 208, 131, 0.1);
}

/* ─── Header Nav Buttons ─── */
.nav-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}
.nav-btn .nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    font-size: 10px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.nav-btn:hover .nav-icon {
    transform: scale(1.12);
}
.nav-btn .nav-tip {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1e21;
    border: 1px solid #363b3e;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 400;
    white-space: nowrap;
    z-index: 200;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    color: rgb(209, 213, 219);
    letter-spacing: 0;
}
.nav-btn .nav-tip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: #363b3e;
}
.nav-btn:hover .nav-tip {
    display: block;
    animation: tipReveal 0.15s ease-out;
}
@keyframes tipReveal {
    from { opacity: 0; transform: translateX(-50%) translateY(4px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Store – violet */
.nav-btn-store {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.22);
    color: rgb(167, 139, 250);
}
.nav-btn-store:hover {
    background: rgba(139, 92, 246, 0.16);
    border-color: rgba(139, 92, 246, 0.4);
}
.nav-btn-store .nav-icon {
    background: rgba(139, 92, 246, 0.18);
    color: rgb(167, 139, 250);
}

/* Agents – amber */
.nav-btn-agents {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.22);
    color: rgb(251, 191, 36);
}
.nav-btn-agents:hover {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.4);
}
.nav-btn-agents .nav-icon {
    background: rgba(245, 158, 11, 0.18);
    color: rgb(251, 191, 36);
}

/* Add MCP – green CTA with glow */
.nav-btn-add {
    background: rgba(112, 208, 131, 0.1);
    border-color: rgba(112, 208, 131, 0.5);
    color: #70d083;
    font-weight: 600;
}
.nav-btn-add:hover {
    background: rgba(112, 208, 131, 0.18);
    border-color: #70d083;
    box-shadow: 0 0 14px rgba(112, 208, 131, 0.2), inset 0 0 14px rgba(112, 208, 131, 0.04);
}
.nav-btn-add .nav-icon {
    background: rgba(112, 208, 131, 0.2);
    color: #70d083;
}

/* Active state – bright ring for currently open panel */
.nav-btn-store.nav-btn-active {
    background: rgba(139, 92, 246, 0.22);
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.15);
}
.nav-btn-agents.nav-btn-active {
    background: rgba(245, 158, 11, 0.22);
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

/* Column info tooltip */
.col-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #2a2f32;
    color: rgb(156, 163, 175);
    font-size: 9px;
    font-style: italic;
    font-weight: 600;
    cursor: help;
    margin-left: 4px;
    flex-shrink: 0;
}
.col-info .col-tip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #191d1f;
    color: rgb(209, 213, 219);
    border: 1px solid #363b3e;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 11px;
    font-style: normal;
    font-weight: 400;
    white-space: nowrap;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}
.col-info .col-tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #363b3e;
}
.col-info:hover .col-tip {
    display: block;
}
