/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f6f8; color: #1a1a2e; line-height: 1.5; font-size: 14px; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Navbar */
.navbar { display: flex; justify-content: space-between; align-items: center; background: #1a1a2e; color: #fff; padding: 0 24px; height: 48px; position: sticky; top: 0; z-index: 100; }
.nav-brand { color: #fff; font-weight: 700; font-size: 16px; }
.nav-brand:hover { text-decoration: none; color: #a5b4fc; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-link { color: #c7d2fe; font-size: 13px; }
.nav-link:hover { color: #fff; text-decoration: none; }
.nav-user { color: #a5b4fc; font-size: 13px; font-weight: 500; }
.logout { color: #f87171; }

/* Container */
.container { max-width: 1400px; margin: 0 auto; padding: 16px 24px; }

/* Flash Messages */
.flash { padding: 10px 16px; border-radius: 6px; margin-bottom: 12px; font-size: 13px; }
.flash-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Toolbar */
.toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; background: #fff; padding: 12px 16px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.filter-tabs { display: flex; gap: 4px; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 6px; font-size: 13px; font-weight: 500; color: #475569; background: #f1f5f9; transition: all 0.15s; }
.tab:hover { background: #e2e8f0; text-decoration: none; color: #1e293b; }
.tab.active { background: #2563eb; color: #fff; }
.tab.active .badge { background: rgba(255,255,255,0.25); color: #fff; }
.badge { background: #e2e8f0; color: #475569; padding: 1px 7px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.toolbar-right { display: flex; align-items: center; gap: 10px; }
.search-input { border: 1px solid #d1d5db; border-radius: 6px; padding: 6px 12px; font-size: 13px; width: 220px; outline: none; }
.search-input:focus { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,0.15); }
.export-buttons { display: flex; gap: 6px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 6px; font-size: 13px; font-weight: 500; border: 1px solid #d1d5db; background: #fff; color: #374151; cursor: pointer; transition: all 0.15s; }
.btn:hover { background: #f3f4f6; text-decoration: none; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-primary { background: #2563eb; color: #fff; border-color: #2563eb; }
.btn-primary:hover { background: #1d4ed8; }
.btn-full { width: 100%; justify-content: center; padding: 10px; }

/* Table */
.table-info { font-size: 12px; color: #6b7280; margin-bottom: 8px; }
.table-wrap { border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.data-table { width: 100%; border-collapse: collapse; background: #fff; }
.data-table th { background: #f8fafc; color: #475569; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; padding: 10px 12px; text-align: left; border-bottom: 2px solid #e2e8f0; }
.data-table td { padding: 8px 12px; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table .num { text-align: right; }
.org-cell { font-size: 12px; color: #6b7280; }

/* Owner Select */
.owner-select { border: 1px solid #e2e8f0; border-radius: 4px; padding: 3px 6px; font-size: 12px; background: #fff; cursor: pointer; min-width: 130px; }
.owner-select:focus { border-color: #2563eb; outline: none; }
.owner-select.saved { animation: flash-green 0.6s; }
@keyframes flash-green { 0% { background: #dcfce7; } 100% { background: #fff; } }

/* Status Badge */
.status-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.status-open { background: #fff7ed; color: #c2410c; }
.status-active { background: #f0fdf4; color: #15803d; }

/* Login */
.login-wrapper { display: flex; justify-content: center; align-items: center; min-height: 80vh; }
.login-card { background: #fff; border-radius: 12px; padding: 40px; box-shadow: 0 4px 24px rgba(0,0,0,0.1); width: 360px; }
.login-card h1 { font-size: 24px; color: #1a1a2e; margin-bottom: 4px; }
.login-subtitle { color: #6b7280; font-size: 14px; margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: #374151; margin-bottom: 4px; }
.form-group input { width: 100%; border: 1px solid #d1d5db; border-radius: 6px; padding: 10px 12px; font-size: 14px; }
.form-group input:focus { border-color: #2563eb; outline: none; box-shadow: 0 0 0 2px rgba(37,99,235,0.15); }

/* Detail Page */
.detail-header { margin-bottom: 20px; }
.back-link { font-size: 13px; color: #6b7280; display: inline-block; margin-bottom: 8px; }
.back-link:hover { color: #2563eb; }
.detail-header h1 { font-size: 22px; margin-bottom: 8px; }
.detail-meta { display: flex; gap: 24px; align-items: center; }
.meta-item { font-size: 13px; color: #475569; }

/* Empty state */
.empty-state { text-align: center; padding: 40px; color: #9ca3af; }

