/* Classic View - Lightweight, table-based UI for fast page loads */
/* ESIIL Brand: #234A65 primary, #42BCDC accent, #007135 green */

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

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #161A19;
    background: #ffffff;
    margin: 0;
    padding: 0;
}

a { color: #42BCDC; text-decoration: none; }
a:hover { color: #234A65; 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: #234A65;
    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: #a0d8ef; }
.classic-topnav a:hover { color: #fff; text-decoration: none; }
.classic-topnav .spacer { flex: 1; }
.classic-topnav .btn-login {
    padding: 0.25rem 0.75rem;
    background: linear-gradient(90deg, #42BCDC, #007135);
    color: #fff;
    border-radius: 0;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}
.classic-topnav .btn-login:hover { opacity: 0.9; text-decoration: none; }
.classic-topnav .view-toggle {
    font-size: 12px;
    color: #a0d8ef;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 0;
}
.classic-topnav .view-toggle:hover { color: #fff; border-color: #42BCDC; text-decoration: none; }

/* Sidebar */
.classic-sidebar {
    width: 180px;
    min-width: 180px;
    background: #f9fafb;
    border-right: 1px solid #E3E3E3;
    padding: 0.75rem 0;
    font-size: 13px;
}
.classic-sidebar .nav-section-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #234A65;
    padding: 0.5rem 0.75rem 0.25rem;
    margin: 0;
    font-weight: 700;
}
.classic-sidebar a {
    display: block;
    padding: 0.35rem 0.75rem;
    color: #161A19;
    border-left: 3px solid transparent;
}
.classic-sidebar a:hover {
    background: #E3E3E3;
    text-decoration: none;
}
.classic-sidebar a.active {
    background: #e8f6fb;
    border-left-color: #42BCDC;
    color: #234A65;
    font-weight: 700;
}

/* 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: 700;
    margin: 0;
    color: #234A65;
}
.classic-page-header .count {
    font-size: 0.875rem;
    color: #42BCDC;
}

/* 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 #E3E3E3;
    border-radius: 0;
    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: 0;
    color: #4b5563;
}
.classic-filters a:hover { background: #f3f4f6; text-decoration: none; }
.classic-filters .active {
    background: #234A65;
    color: #fff;
    font-weight: 700;
}

/* Breadcrumbs */
.classic-breadcrumb {
    font-size: 13px;
    margin-bottom: 0.75rem;
    color: #4b5563;
}
.classic-breadcrumb a { color: #42BCDC; }
.classic-breadcrumb a:hover { color: #234A65; }
.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 #E3E3E3;
    font-weight: 700;
    color: #234A65;
    white-space: nowrap;
    position: sticky;
    top: 0;
}
.classic-table td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid #E3E3E3;
    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: #4b5563; 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: 700; font-size: 12px; }
.status-running { color: #007135; }
.status-completed { color: #4b5563; }
.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: #42BCDC; }
.action-link-primary:hover { color: #234A65; }
.action-link-danger { color: #dc2626; }
.action-link-success { color: #007135; }

/* Buttons — ESIIL brand: gradient, uppercase, bold, no radius */
.classic-btn {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    font-size: 13px;
    font-weight: 700;
    border: 2px solid #234A65;
    border-radius: 0;
    background: #fff;
    color: #234A65;
    cursor: pointer;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.2s ease;
}
.classic-btn:hover { background: #234A65; color: #fff; text-decoration: none; }
.classic-btn-primary {
    background: linear-gradient(90deg, #42BCDC, #007135);
    color: #fff; border-color: transparent;
}
.classic-btn-primary:hover { opacity: 0.9; }
.classic-btn-success {
    background: linear-gradient(90deg, #42BCDC, #007135);
    color: #fff; border-color: transparent;
}
.classic-btn-success:hover { opacity: 0.9; }

/* Pagination */
.classic-pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 13px;
    color: #4b5563;
}
.classic-pagination a {
    padding: 0.25rem 0.5rem;
    border: 1px solid #E3E3E3;
    border-radius: 0;
    color: #234A65;
}
.classic-pagination a:hover { background: #f3f4f6; text-decoration: none; }

/* Info/warning messages */
.classic-info {
    padding: 0.5rem 0.75rem;
    background: #e8f6fb;
    border: 1px solid #42BCDC;
    border-radius: 0;
    font-size: 13px;
    color: #234A65;
    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 #E3E3E3;
    border-radius: 0;
    color: #161A19;
    font-size: 14px;
}
.classic-quicklinks a:hover { background: #f9fafb; text-decoration: none; border-color: #42BCDC; }

/* 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: 0;
    color: #234A65; background: none; border: none; vertical-align: middle;
}
.icon-btn:hover { background: #E3E3E3; 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: #4b5563; padding: 2px 6px; border-radius: 0; line-height: 1;
}
.kebab-btn:hover { background: #E3E3E3; color: #234A65; }
.kebab-menu {
    display: none; position: absolute; right: 0; top: 100%; z-index: 50;
    background: #fff; border: 1px solid #E3E3E3; border-radius: 0;
    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: #161A19; 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 #E3E3E3; margin: 4px 0; }

/* Toast notifications */
.classic-toast {
    position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 1000;
    padding: 0.5rem 1rem; border-radius: 0; font-size: 13px;
    color: #fff; background: #234A65; 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: #007135; }

/* 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: #5ccfee; }
    a:hover { color: #fff; }
    .classic-sidebar { background: #1e293b; border-color: #334155; }
    .classic-sidebar a { color: #cbd5e1; }
    .classic-sidebar a:hover { background: #334155; }
    .classic-sidebar a.active { background: #1a3a50; border-left-color: #5ccfee; color: #5ccfee; }
    .classic-sidebar .nav-section-title { color: #5ccfee; }
    .classic-content { background: #0f172a; }
    .classic-page-header h1 { color: #5ccfee; }
    .classic-page-header .count { color: #5ccfee; }
    .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: #5ccfee; color: #5ccfee; }
    .classic-btn:hover { background: #5ccfee; color: #0f172a; }
    .classic-info { background: #1e293b; border-color: #334155; color: #5ccfee; }
    .classic-quicklinks a { border-color: #334155; color: #cbd5e1; }
    .classic-quicklinks a:hover { background: #1e293b; border-color: #5ccfee; }
    .classic-breadcrumb { color: #94a3b8; }
    .classic-breadcrumb a { color: #5ccfee; }
    .classic-filters a, .classic-filters span { color: #94a3b8; }
    .classic-filters a:hover { background: #1e293b; }
    .classic-filters .active { background: #3a6a8a; color: #fff; }
    .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; }
    .icon-btn { color: #cbd5e1; }
    .icon-btn:hover { background: #334155; }
    .status-running { color: #00a050; }
    .action-link-primary { color: #5ccfee; }
    .action-link-success { color: #00a050; }
}
