/* Classic View - Lightweight, table-based UI for fast page loads */
/* No external fonts, no Font Awesome, no animations */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #1a1a2e;
    background: #ffffff;
    margin: 0;
    padding: 0;
}

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.classic-container {
    display: flex;
    min-height: 100vh;
}

/* Top Nav */
.classic-topnav {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: #0f2027;
    color: #e0e0e0;
    font-size: 13px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.classic-topnav .brand {
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    margin-right: 1rem;
}
.classic-topnav a { color: #94c5e8; }
.classic-topnav a:hover { color: #fff; }
.classic-topnav .spacer { flex: 1; }
.classic-topnav .btn-login {
    padding: 0.25rem 0.75rem;
    background: #16a34a;
    color: #fff;
    border-radius: 4px;
    font-size: 13px;
}
.classic-topnav .btn-login:hover { background: #15803d; text-decoration: none; }
.classic-topnav .view-toggle {
    font-size: 12px;
    color: #78a5c0;
    cursor: pointer;
    border: 1px solid #334155;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
}
.classic-topnav .view-toggle:hover { color: #fff; border-color: #64b5f6; text-decoration: none; }

/* Sidebar */
.classic-sidebar {
    width: 180px;
    min-width: 180px;
    background: #f8f9fa;
    border-right: 1px solid #e5e7eb;
    padding: 0.75rem 0;
    font-size: 13px;
}
.classic-sidebar .nav-section-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    padding: 0.5rem 0.75rem 0.25rem;
    margin: 0;
    font-weight: 600;
}
.classic-sidebar a {
    display: block;
    padding: 0.35rem 0.75rem;
    color: #374151;
    border-left: 3px solid transparent;
}
.classic-sidebar a:hover {
    background: #e5e7eb;
    text-decoration: none;
}
.classic-sidebar a.active {
    background: #e0ecff;
    border-left-color: #2563eb;
    color: #1d4ed8;
    font-weight: 600;
}

/* Content */
.classic-content {
    flex: 1;
    padding: 1.25rem 1.5rem;
    min-width: 0;
    overflow-x: auto;
}

/* Page header */
.classic-page-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.classic-page-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: #111827;
}
.classic-page-header .count {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Toolbar */
.classic-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.classic-toolbar select,
.classic-toolbar input[type="text"] {
    padding: 0.3rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
}
.classic-toolbar input[type="text"] { width: 220px; }

/* Filter links */
.classic-filters {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}
.classic-filters a, .classic-filters span {
    padding: 0.25rem 0.6rem;
    font-size: 12px;
    border-radius: 3px;
    color: #4b5563;
}
.classic-filters a:hover { background: #f3f4f6; text-decoration: none; }
.classic-filters .active {
    background: #2563eb;
    color: #fff;
    font-weight: 600;
}

/* Breadcrumbs */
.classic-breadcrumb {
    font-size: 13px;
    margin-bottom: 0.75rem;
    color: #6b7280;
}
.classic-breadcrumb a { color: #2563eb; }
.classic-breadcrumb .sep { margin: 0 0.25rem; color: #9ca3af; }

/* Tables */
.classic-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.classic-table th {
    text-align: left;
    padding: 0.5rem 0.6rem;
    background: #f3f4f6;
    border-bottom: 2px solid #d1d5db;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
    position: sticky;
    top: 0;
}
.classic-table td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
.classic-table tbody tr:hover { background: #f9fafb; }
.classic-table .col-checkbox { width: 30px; }
.classic-table .col-icon { width: 24px; text-align: center; }
.classic-table .col-actions { white-space: nowrap; }
.classic-table .col-size,
.classic-table .col-date { white-space: nowrap; color: #6b7280; font-size: 12px; }

/* Inline icons (unicode replacements for Font Awesome) */
.icon-folder::before { content: "\1F4C1"; margin-right: 0.3rem; }
.icon-file::before { content: "\1F4C4"; margin-right: 0.3rem; }
.icon-app::before { content: "\25B6"; margin-right: 0.3rem; }

/* Status badges */
.status { font-weight: 600; font-size: 12px; }
.status-running { color: #059669; }
.status-completed { color: #6b7280; }
.status-failed { color: #dc2626; }
.status-submitted, .status-pending { color: #d97706; }
.status-canceled { color: #9ca3af; }

/* Action links */
.action-link {
    font-size: 12px;
    margin-right: 0.5rem;
    white-space: nowrap;
}
.action-link-primary { color: #2563eb; }
.action-link-danger { color: #dc2626; }
.action-link-success { color: #16a34a; }

/* Buttons */
.classic-btn {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    font-size: 13px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    text-decoration: none;
}
.classic-btn:hover { background: #f3f4f6; text-decoration: none; }
.classic-btn-primary { background: #2563eb; color: #fff; border-color: #2563eb; }
.classic-btn-primary:hover { background: #1d4ed8; }
.classic-btn-success { background: #16a34a; color: #fff; border-color: #16a34a; }
.classic-btn-success:hover { background: #15803d; }

/* Pagination */
.classic-pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 13px;
    color: #6b7280;
}
.classic-pagination a {
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    color: #374151;
}
.classic-pagination a:hover { background: #f3f4f6; text-decoration: none; }

/* Info/warning messages */
.classic-info {
    padding: 0.5rem 0.75rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 4px;
    font-size: 13px;
    color: #1e40af;
    margin-bottom: 0.75rem;
}

/* Quick links grid */
.classic-quicklinks {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}
.classic-quicklinks a {
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #374151;
    font-size: 14px;
}
.classic-quicklinks a:hover { background: #f9fafb; text-decoration: none; border-color: #2563eb; }

/* Empty state */
.classic-empty {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
    font-size: 14px;
}

/* Icon action buttons (inline, emoji-based) */
.icon-btn {
    display: inline-block; font-size: 16px; padding: 2px 4px;
    cursor: pointer; text-decoration: none; border-radius: 4px;
    color: #374151; background: none; border: none; vertical-align: middle;
}
.icon-btn:hover { background: #e5e7eb; text-decoration: none; }
.icon-btn-danger:hover { background: #fef2f2; }

/* Kebab dropdown menu */
.kebab-cell { position: relative; width: 32px; text-align: center; }
.kebab-btn {
    background: none; border: none; cursor: pointer; font-size: 18px;
    color: #6b7280; padding: 2px 6px; border-radius: 4px; line-height: 1;
}
.kebab-btn:hover { background: #e5e7eb; color: #374151; }
.kebab-menu {
    display: none; position: absolute; right: 0; top: 100%; z-index: 50;
    background: #fff; border: 1px solid #d1d5db; border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,.12); min-width: 160px;
    padding: 4px 0; font-size: 13px;
}
.kebab-menu.open { display: block; }
.kebab-menu a, .kebab-menu button {
    display: block; width: 100%; text-align: left; padding: 6px 12px;
    color: #374151; background: none; border: none; cursor: pointer;
    font-size: 13px; text-decoration: none;
}
.kebab-menu a:hover, .kebab-menu button:hover { background: #f3f4f6; text-decoration: none; }
.kebab-menu .danger { color: #dc2626; }
.kebab-menu .danger:hover { background: #fef2f2; }
.kebab-menu .separator { border-top: 1px solid #e5e7eb; margin: 4px 0; }

/* Toast notifications */
.classic-toast {
    position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 1000;
    padding: 0.5rem 1rem; border-radius: 6px; font-size: 13px;
    color: #fff; background: #1e293b; box-shadow: 0 4px 12px rgba(0,0,0,.2);
    opacity: 0; transition: opacity .2s; pointer-events: none;
}
.classic-toast.show { opacity: 1; }
.classic-toast.error { background: #dc2626; }
.classic-toast.success { background: #059669; }

/* Data browser toolbar */
.db-toolbar {
    display: flex; align-items: center; gap: 0.5rem;
    margin-bottom: 0.75rem; flex-wrap: wrap;
}
.db-toolbar .spacer { flex: 1; }

/* Dark mode */
@media (prefers-color-scheme: dark) {
    body { background: #0f172a; color: #e2e8f0; }
    a { color: #60a5fa; }
    .classic-sidebar { background: #1e293b; border-color: #334155; }
    .classic-sidebar a { color: #cbd5e1; }
    .classic-sidebar a:hover { background: #334155; }
    .classic-sidebar a.active { background: #1e3a5f; border-left-color: #60a5fa; color: #93c5fd; }
    .classic-sidebar .nav-section-title { color: #64748b; }
    .classic-content { background: #0f172a; }
    .classic-page-header h1 { color: #f1f5f9; }
    .classic-table th { background: #1e293b; border-color: #334155; color: #cbd5e1; }
    .classic-table td { border-color: #1e293b; }
    .classic-table tbody tr:hover { background: #1e293b; }
    .classic-toolbar select, .classic-toolbar input[type="text"] { background: #1e293b; border-color: #334155; color: #e2e8f0; }
    .classic-btn { background: #1e293b; border-color: #334155; color: #e2e8f0; }
    .classic-btn:hover { background: #334155; }
    .classic-info { background: #1e293b; border-color: #334155; color: #93c5fd; }
    .classic-quicklinks a { border-color: #334155; color: #cbd5e1; }
    .classic-quicklinks a:hover { background: #1e293b; border-color: #60a5fa; }
    .classic-breadcrumb { color: #94a3b8; }
    .classic-filters a, .classic-filters span { color: #94a3b8; }
    .classic-filters a:hover { background: #1e293b; }
    .classic-pagination a { border-color: #334155; color: #cbd5e1; }
    .classic-pagination a:hover { background: #1e293b; }
    .kebab-btn { color: #94a3b8; }
    .kebab-btn:hover { background: #334155; color: #e2e8f0; }
    .kebab-menu { background: #1e293b; border-color: #334155; }
    .kebab-menu a, .kebab-menu button { color: #cbd5e1; }
    .kebab-menu a:hover, .kebab-menu button:hover { background: #334155; }
    .kebab-menu .danger { color: #f87171; }
    .kebab-menu .danger:hover { background: #371520; }
    .kebab-menu .separator { border-color: #334155; }
    .classic-toast { background: #334155; }
}
