/* ============================================
   Alessandro Cloud — Custom Styles
   Dark theme with accent colors
   ============================================ */

:root {
    --ac-bg:        #0f172a;
    --ac-surface:   #1e293b;
    --ac-border:    #334155;
    --ac-accent:    #06b6d4;
    --ac-accent-hover: #22d3ee;
    --ac-text:      #e2e8f0;
    --ac-muted:     #94a3b8;
}

body {
    background-color: var(--ac-bg);
    color: var(--ac-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

main {
    flex: 1;
}

/* Navbar */
.ac-navbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ac-border);
}

/* Accent utilities */
.text-accent {
    color: var(--ac-accent) !important;
}

.btn-accent {
    background: linear-gradient(135deg, var(--ac-accent), #0891b2);
    border: none;
    color: #0f172a;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-accent:hover {
    background: linear-gradient(135deg, var(--ac-accent-hover), #06b6d4);
    color: #0f172a;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

/* Cards */
.ac-card {
    background: var(--ac-surface);
    border: 1px solid var(--ac-border);
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ac-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.ac-stat-card {
    border-top: 3px solid var(--ac-accent);
}

/* Footer */
.ac-footer {
    background: var(--ac-surface);
    border-top: 1px solid var(--ac-border);
}

/* Form controls */
.form-control, .input-group-text {
    background-color: var(--ac-bg);
    border-color: var(--ac-border);
    color: var(--ac-text);
}

.form-control:focus {
    background-color: var(--ac-bg);
    border-color: var(--ac-accent);
    color: var(--ac-text);
    box-shadow: 0 0 0 0.2rem rgba(6, 182, 212, 0.25);
}

/* Table */
.table-dark {
    --bs-table-bg: transparent;
}

/* Chat styles */
.ac-chat-container {
    height: calc(100vh - 320px);
    min-height: 400px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.ac-msg {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    animation: fadeIn 0.3s ease;
}

.ac-msg-user {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.ac-msg-assistant {
    background: var(--ac-surface);
    border: 1px solid var(--ac-border);
    border-bottom-left-radius: 4px;
}

.ac-msg-sources {
    font-size: 0.8rem;
    border-top: 1px solid var(--ac-border);
    margin-top: 8px;
    padding-top: 8px;
}

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--ac-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--ac-border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ac-muted);
}

/* Monitoring status indicators */
.status-online  { color: #22c55e; }
.status-offline { color: #ef4444; }
.status-warning { color: #f59e0b; }

/* File list */
.ac-file-row {
    transition: background 0.15s ease;
}

.ac-file-row:hover {
    background: rgba(6, 182, 212, 0.05);
}

/* Log viewer */
.ac-log-viewer {
    background: #000;
    color: #22c55e;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    padding: 16px;
    border-radius: 8px;
    max-height: 500px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}
