/* Dashboard Design System - Agent Dashboard */

/* ============================================================================
   CSS VARIABLES
   ============================================================================ */
:root {
    /* Base Colors */
    --white: #ffffff;
    --off-white: #fafafa;
    --gray-lightest: #f0f0f0;
    --gray-lighter: #e0e0e0;
    --gray-light: #c0c0c0;
    --gray: #909090;
    --gray-dark: #606060;
    --gray-darker: #404040;
    --dark: #202020;
    --black: #0a0a0a;

    /* Gold Accent */
    --gold: #d0a840;
    --gold-light: #e0bc55;
    --gold-dark: #b89230;
    --gold-glow: rgba(208, 168, 64, 0.4);

    /* Glass */
    --glass-white: rgba(255, 255, 255, 0.65);
    --glass-white-strong: rgba(255, 255, 255, 0.82);
    --glass-border: rgba(255, 255, 255, 0.9);
    --glass-shadow: rgba(0, 0, 0, 0.06);

    /* Spacing */
    --sp-xs: 4px;
    --sp-sm: 8px;
    --sp-md: 16px;
    --sp-lg: 24px;
    --sp-xl: 32px;
    --sp-2xl: 48px;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================================
   RESET & BASE
   ============================================================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--off-white);
    color: var(--gray-darker);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* ============================================================================
   ANIMATED BACKGROUND
   ============================================================================ */
.bg-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: radial-gradient(ellipse 120% 80% at 50% -10%, var(--gray-lightest) 0%, var(--off-white) 50%, var(--white) 100%);
}

.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    will-change: transform;
}

.bg-blob-1 {
    width: 600px;
    height: 600px;
    background: var(--gray-lighter);
    opacity: 0.7;
    top: -10%;
    left: -8%;
    animation: blobDrift1 18s ease-in-out infinite;
}

.bg-blob-2 {
    width: 400px;
    height: 400px;
    background: var(--gold);
    opacity: 0.12;
    top: 20%;
    right: -5%;
    animation: blobDrift2 14s ease-in-out infinite;
}

.bg-blob-3 {
    width: 500px;
    height: 500px;
    background: var(--gray-lighter);
    opacity: 0.5;
    bottom: -15%;
    left: 30%;
    animation: blobDrift3 20s ease-in-out infinite;
}

.bg-blob-4 {
    width: 350px;
    height: 350px;
    background: var(--gold);
    opacity: 0.08;
    bottom: 10%;
    right: 20%;
    animation: blobDrift4 16s ease-in-out infinite;
}

@keyframes blobDrift1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.05); }
    66% { transform: translate(-25px, 20px) scale(0.95); }
}

@keyframes blobDrift2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-30px, 25px) scale(1.03); }
    66% { transform: translate(20px, -15px) scale(0.97); }
}

@keyframes blobDrift3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(35px, -25px) scale(1.04); }
}

@keyframes blobDrift4 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    40% { transform: translate(-20px, -30px) scale(1.06); }
    80% { transform: translate(15px, 20px) scale(0.96); }
}

/* ============================================================================
   SCROLLBAR
   ============================================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray); }

/* ============================================================================
   LOGIN SCREEN
   ============================================================================ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding: var(--sp-lg);
}

.login-box {
    width: 100%;
    max-width: 420px;
    background: var(--glass-white-strong);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--sp-2xl);
    box-shadow:
        0 20px 60px var(--glass-shadow),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    animation: fadeInUp 0.6s var(--ease);
}

.login-logo {
    display: block;
    width: 90px;
    height: auto;
    margin: 0 auto var(--sp-lg);
    opacity: 0.8;
}

.login-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--black);
    text-align: center;
    line-height: 1.1;
    margin-bottom: var(--sp-xs);
}

.login-title .gold {
    color: var(--gold);
}

.login-subtitle {
    font-size: 0.9rem;
    color: var(--gray);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 500;
    margin-bottom: var(--sp-xl);
}

.login-sep {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-light), var(--gold), var(--gold-light));
    border-radius: 2px;
    margin: 0 auto var(--sp-xl);
}

/* ============================================================================
   FORM ELEMENTS
   ============================================================================ */
.input-group {
    margin-bottom: var(--sp-lg);
}

.input-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--sp-sm);
}

.input-field {
    width: 100%;
    padding: 14px 18px;
    font-size: 0.95rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--gray-lighter);
    border-radius: var(--radius-sm);
    color: var(--dark);
    transition: all 0.25s var(--ease);
}

.input-field:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-glow);
    background: var(--white);
}

.input-field::placeholder {
    color: var(--gray-light);
}

textarea.input-field {
    min-height: 350px;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.7;
    resize: vertical;
}

textarea.input-field.readonly {
    background: var(--gray-lightest);
    cursor: not-allowed;
    color: var(--gray-dark);
}

/* ============================================================================
   BUTTONS
   ============================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.25s var(--ease);
    white-space: nowrap;
    text-decoration: none;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: var(--white);
    box-shadow: 0 4px 16px var(--gold-glow);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--gold-glow);
}

.btn-gold:active {
    transform: translateY(0);
}

.btn-gold.full {
    width: 100%;
    padding: 16px;
    font-size: 0.95rem;
}

.btn-black {
    background: var(--black);
    color: var(--white);
}

.btn-black:hover {
    opacity: 0.85;
}

.btn-outline {
    background: transparent;
    color: var(--dark);
    border: 1px solid var(--gray-lighter);
}

.btn-outline:hover {
    background: var(--white);
    border-color: var(--gray-light);
}

.btn-danger {
    background: transparent;
    color: #c0392b;
    border: 1px solid #e74c3c;
}

.btn-danger:hover {
    background: #e74c3c;
    color: var(--white);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ============================================================================
   DASHBOARD LAYOUT
   ============================================================================ */
.dashboard-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* ============================================================================
   HEADER
   ============================================================================ */
.dash-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-white-strong);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.dash-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-logo {
    width: 42px;
    height: auto;
    opacity: 0.7;
}

.header-title-group {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.header-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--black);
    line-height: 1;
}

.header-badge {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gray);
    background: var(--gray-lightest);
    padding: 4px 10px;
    border-radius: 20px;
}

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

.header-gold-line {
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold-light), var(--gold), var(--gold-light), transparent);
}

/* Agent status pill */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.2);
}

.status-pill.error {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border-color: rgba(231, 76, 60, 0.2);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ============================================================================
   MAIN CONTENT
   ============================================================================ */
.dash-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px;
}

/* ============================================================================
   TAB NAVIGATION
   ============================================================================ */
.tab-nav {
    display: flex;
    gap: 4px;
    background: var(--glass-white);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: var(--sp-xl);
    box-shadow: 0 4px 16px var(--glass-shadow);
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.25s var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--dark);
    background: rgba(255, 255, 255, 0.5);
}

.tab-btn.active {
    background: var(--white);
    color: var(--black);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.tab-btn i {
    font-size: 0.9rem;
}

.tab-btn .tab-count {
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--gray-lightest);
    color: var(--gray-dark);
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
}

.tab-btn.active .tab-count {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: var(--white);
}

/* Tab content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s var(--ease);
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================================
   GLASS PANEL
   ============================================================================ */
.glass-panel {
    background: var(--glass-white-strong);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-xl);
    box-shadow: 0 8px 32px var(--glass-shadow);
    margin-bottom: var(--sp-lg);
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: var(--sp-lg);
}

.panel-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--black);
    line-height: 1.2;
}

.panel-subtitle {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 4px;
}

.panel-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 16px var(--gold-glow);
    flex-shrink: 0;
}

.panel-icon i {
    font-size: 1.2rem;
    color: var(--white);
}

/* ============================================================================
   SECTION DIVIDER
   ============================================================================ */
.divider {
    border: none;
    height: 1px;
    background: var(--gray-lighter);
    margin: var(--sp-lg) 0;
}

.divider-gold {
    height: 2px;
    background: linear-gradient(90deg, var(--gold-light), var(--gold), var(--gold-light));
    border: none;
    margin: var(--sp-lg) 0;
    border-radius: 1px;
    opacity: 0.6;
}

/* ============================================================================
   ADD TOOL FORM
   ============================================================================ */
.add-tool-section {
    background: rgba(255, 255, 255, 0.5);
    border: 1px dashed var(--gray-lighter);
    border-radius: var(--radius-md);
    padding: var(--sp-lg);
    margin-bottom: var(--sp-lg);
}

.add-tool-section .section-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gold-dark);
    margin-bottom: var(--sp-md);
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-tool-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr auto;
    gap: 12px;
    align-items: end;
}

.add-tool-grid .input-group {
    margin-bottom: 0;
}

/* ============================================================================
   TOOLS LIST HEADER
   ============================================================================ */
.tools-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp-lg);
}

.tools-count-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
}

.tools-count-label .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 26px;
    height: 26px;
    border-radius: 13px;
    padding: 0 8px;
    margin-left: 8px;
    box-shadow: 0 2px 8px var(--gold-glow);
}

.tools-header-actions {
    display: flex;
    gap: 8px;
}

/* ============================================================================
   TOOL CARDS
   ============================================================================ */
.tools-grid {
    display: grid;
    gap: 12px;
}

.tool-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--sp-lg);
    align-items: center;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--gray-lighter);
    border-radius: var(--radius-md);
    transition: all 0.25s var(--ease);
}

.tool-card:hover {
    border-color: var(--gold-light);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05), 0 0 20px var(--gold-glow);
    transform: translateY(-2px);
}

.tool-card.disabled {
    opacity: 0.55;
}

.tool-card.disabled:hover {
    border-color: var(--gray-lighter);
    box-shadow: none;
    transform: none;
}

.tool-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--black);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.tool-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tool-status-dot.active { background: #27ae60; }
.tool-status-dot.inactive { background: #e74c3c; }

.tool-desc {
    font-size: 0.85rem;
    color: var(--gray-dark);
    margin-bottom: 4px;
}

.tool-url {
    font-size: 0.75rem;
    color: var(--gray);
    font-family: 'SF Mono', 'Fira Code', monospace;
    word-break: break-all;
}

.tool-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.health-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 12px;
}

.health-badge.healthy {
    background: rgba(39, 174, 96, 0.12);
    color: #27ae60;
}

.health-badge.unhealthy {
    background: rgba(231, 76, 60, 0.12);
    color: #e74c3c;
}

.health-badge.error {
    background: rgba(230, 126, 34, 0.12);
    color: #e67e22;
}

.health-badge.unknown {
    background: rgba(149, 165, 166, 0.12);
    color: #95a5a6;
}

.tool-last-check {
    font-size: 0.7rem;
    color: var(--gray);
}

.tool-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* ============================================================================
   MOBILE / SIRI TAB
   ============================================================================ */
.info-hero {
    background: linear-gradient(135deg, var(--dark), var(--black));
    border-radius: var(--radius-lg);
    padding: var(--sp-xl);
    margin-bottom: var(--sp-xl);
    display: flex;
    align-items: flex-start;
    gap: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.info-hero-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    box-shadow: 0 4px 16px var(--gold-glow);
}

.info-hero-icon i {
    font-size: 1.4rem;
    color: var(--white);
}

.info-hero-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 8px;
}

.info-hero-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
}

.info-hero-text code {
    background: rgba(255, 255, 255, 0.12);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--gold-light);
}

/* Comparison grid */
.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: var(--sp-xl);
}

.compare-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--gray-lighter);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all 0.25s var(--ease);
}

.compare-card.highlight {
    border-color: var(--gold);
    background: rgba(208, 168, 64, 0.04);
}

.compare-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.compare-card.highlight .compare-card-title {
    color: var(--gold-dark);
}

.compare-card pre {
    background: var(--white);
    border: 1px solid var(--gray-lighter);
    border-radius: var(--radius-sm);
    padding: 14px;
    font-size: 0.8rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
    overflow-x: auto;
    margin-bottom: 12px;
}

.compare-card.highlight pre {
    border-color: var(--gold-light);
}

.compare-card-info {
    font-size: 0.8rem;
    color: var(--gray-dark);
    line-height: 1.7;
}

.compare-card-info code {
    background: var(--gray-lightest);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.78rem;
}

/* Section label */
.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: var(--sp-md);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--gold);
}

/* Code block */
.code-block {
    background: var(--gray-lightest);
    border-radius: var(--radius-sm);
    padding: 20px;
    border-left: 3px solid var(--gold);
}

.code-step-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold-dark);
    margin-bottom: 10px;
}

.code-step-title .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--gold);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.7rem;
    margin-right: 8px;
}

.code-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    margin-bottom: 16px;
}

.code-table td {
    padding: 10px 14px;
    border: 1px solid var(--gray-lighter);
    background: var(--white);
}

.code-table td:first-child {
    font-weight: 600;
    width: 120px;
    color: var(--dark);
}

.code-table code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
}

/* Info cards grid */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.info-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--gray-lighter);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.info-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold-dark);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-card-label i {
    color: var(--gold);
}

.info-card-text {
    font-size: 0.82rem;
    color: var(--gray-dark);
    line-height: 1.6;
}

.info-card-text code {
    background: var(--gray-lightest);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.78rem;
}

/* ============================================================================
   PROMPT & MEMORY EDITORS
   ============================================================================ */
.editor-wrap {
    margin-top: var(--sp-md);
}

.editor-actions {
    display: flex;
    gap: 10px;
    margin-top: var(--sp-md);
}

.readonly-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--gray-darker);
    color: var(--white);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.info-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(208, 168, 64, 0.08);
    border: 1px solid rgba(208, 168, 64, 0.2);
    border-radius: var(--radius-sm);
    margin-bottom: var(--sp-md);
    font-size: 0.82rem;
    color: var(--gray-darker);
    line-height: 1.5;
}

.info-notice i {
    color: var(--gold);
    margin-top: 2px;
    flex-shrink: 0;
}

/* Memory stats */
.memory-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp-md);
}

.memory-stats {
    font-size: 0.85rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 6px;
}

.memory-stats i {
    color: var(--gold);
}

/* ============================================================================
   TOAST NOTIFICATIONS
   ============================================================================ */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--glass-white-strong);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    font-size: 0.85rem;
    color: var(--dark);
    animation: toastIn 0.3s var(--ease);
    max-width: 400px;
}

.toast.success { border-left: 3px solid #27ae60; }
.toast.error { border-left: 3px solid #e74c3c; }
.toast.info { border-left: 3px solid var(--gold); }

.toast i {
    font-size: 1rem;
}

.toast.success i { color: #27ae60; }
.toast.error i { color: #e74c3c; }
.toast.info i { color: var(--gold); }

.toast-out {
    animation: toastOut 0.3s var(--ease) forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(30px); }
}

/* ============================================================================
   ERROR MESSAGE
   ============================================================================ */
.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: var(--sp-sm);
    padding: 8px 14px;
    background: rgba(231, 76, 60, 0.06);
    border-radius: var(--radius-sm);
    text-align: center;
}

/* ============================================================================
   FOOTER
   ============================================================================ */
.dash-footer {
    max-width: 1200px;
    margin: var(--sp-2xl) auto 0;
    padding: 0 32px var(--sp-xl);
}

.dash-footer-inner {
    border-top: 1px solid var(--gray-lighter);
    padding-top: var(--sp-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: var(--gray);
}

.footer-deco {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold-light), var(--gold), var(--gold-light));
    border-radius: 1px;
    opacity: 0.5;
    margin: 0 auto var(--sp-md);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

/* Large screens */
@media (min-width: 1400px) {
    .dash-main, .dash-footer {
        max-width: 1400px;
    }
}

/* Tablet */
@media (max-width: 900px) {
    .dash-header-inner {
        padding: 12px 20px;
        flex-wrap: wrap;
    }

    .header-actions {
        flex-wrap: wrap;
    }

    .dash-main {
        padding: 20px;
    }

    .tab-nav {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 0 0 auto;
        padding: 10px 16px;
        font-size: 0.8rem;
    }

    .add-tool-grid {
        grid-template-columns: 1fr;
    }

    .compare-grid {
        grid-template-columns: 1fr;
    }

    .tool-card {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tool-actions {
        justify-content: flex-start;
    }

    .tools-list-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .dash-header-inner {
        padding: 10px 16px;
    }

    .header-title-group {
        flex-direction: column;
        gap: 2px;
    }

    .header-badge {
        display: none;
    }

    .dash-main {
        padding: 16px;
    }

    .glass-panel {
        padding: 20px;
        border-radius: var(--radius-md);
    }

    .tab-nav {
        gap: 2px;
        padding: 3px;
    }

    .tab-btn {
        padding: 8px 12px;
        font-size: 0.75rem;
        gap: 4px;
    }

    .tab-btn .tab-count {
        display: none;
    }

    .info-hero {
        flex-direction: column;
        padding: 20px;
    }

    .login-box {
        padding: 28px;
        border-radius: var(--radius-lg);
    }

    .login-title {
        font-size: 1.8rem;
    }

    .dash-footer {
        padding: 0 16px var(--sp-md);
    }

    .dash-footer-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* ============================================================================
   UTILITY
   ============================================================================ */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.flex-row { display: flex; align-items: center; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.mb-md { margin-bottom: 16px; }
.mb-lg { margin-bottom: 24px; }
.text-muted { color: var(--gray); }
.text-gold { color: var(--gold); }
.text-sm { font-size: 0.82rem; }
.relative { position: relative; }
