/* styles.css */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary: #2563eb; --primary-dark: #1d4ed8;
    --secondary: #64748b; --success: #16a34a;
    --danger: #dc2626; --warning: #ca8a04;
    --info: #0891b2; --bg: #f8fafc;
    --surface: #ffffff; --text: #0f172a;
    --text-muted: #64748b; --border: #e2e8f0;
    --radius: 12px; --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
}
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; }
.app-container { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }
.header { display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.header h1 { font-size: 1.5rem; font-weight: 700; color: var(--primary);
    display: flex; align-items: center; gap: 0.5rem; }
.user-info { display: flex; align-items: center; gap: 0.75rem;
    font-size: 0.9rem; color: var(--text-muted); }
.login-container { max-width: 400px; margin: 10vh auto; padding: 2rem;
    background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    border: 1px solid var(--border); }
.login-container h2 { text-align: center; margin-bottom: 1.5rem; color: var(--primary); }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--text); }
.form-group input { width: 100%; padding: 0.75rem; border: 1px solid var(--border);
    border-radius: var(--radius); font-size: 1rem; }
.form-group input:focus { outline: none; border-color: var(--primary); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.75rem 1.5rem; border: none; border-radius: var(--radius);
    font-size: 1rem; font-weight: 500; cursor: pointer; transition: all 0.2s; text-decoration: none; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--secondary); color: white; }
.btn-secondary:hover { background: #475569; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem; margin-bottom: 2rem; }
.action-card { background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s; text-decoration: none;
    color: inherit; display: block; }
.action-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.action-card h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--text); }
.action-card p { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1rem; }
.action-card .btn { width: 100%; }
.card-icon { font-size: 2rem; margin-bottom: 0.75rem; display: block; }
.content-section { background: var(--surface); border-radius: var(--radius);
    padding: 2rem; box-shadow: var(--shadow); margin-bottom: 2rem; border: 1px solid var(--border); }
.section-header { display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.section-header h2 { font-size: 1.25rem; font-weight: 600; color: var(--primary); }
.btn-back { background: none; border: none; color: var(--primary); cursor: pointer;
    padding: 0.5rem; font-size: 0.9rem; }
.btn-back:hover { text-decoration: underline; }
.table-container { overflow-x: auto; margin-bottom: 1.5rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table th, table td { padding: 0.75rem; text-align: left; border-bottom: 1px solid var(--border); }
table th { background: #f1f5f9; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; }
table tr:hover { background: #f8fafc; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem; margin-bottom: 1.5rem; }
.form-full { grid-column: 1 / -1; }
.alert { padding: 1rem; border-radius: var(--radius); margin-bottom: 1.5rem; font-size: 0.9rem; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.loading { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--border);
    border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
.result-area { background: #f8fafc; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.5rem; margin-top: 1rem; white-space: pre-wrap; font-family: 'Courier New', monospace;
    font-size: 0.875rem; overflow-x: auto; }
.file-upload { border: 2px dashed var(--border); border-radius: var(--radius);
    padding: 2rem; text-align: center; margin-bottom: 1.5rem; transition: border-color 0.2s; }
.file-upload:hover { border-color: var(--primary); }
.file-upload input[type="file"] { margin-top: 1rem; }
@media (max-width: 768px) {
    .app-container { padding: 1rem; }
    .header { flex-direction: column; gap: 1rem; align-items: flex-start; }
    .actions-grid { grid-template-columns: 1fr; }
    .section-header { flex-direction: column; gap: 1rem; align-items: flex-start; }
    .form-grid { grid-template-columns: 1fr; }
}
.badge { display: inline-block; padding: 0.25rem 0.6rem; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.bg-primary { background: var(--primary); color: white; }
.bg-success { background: var(--success); color: white; }
.bg-danger { background: var(--danger); color: white; }
.bg-warning { background: var(--warning); color: white; }
.bg-info { background: var(--info); color: white; }
.bg-secondary { background: var(--secondary); color: white; }
.pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1rem; }
.pagination a { padding: 0.5rem 0.75rem; border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--primary); text-decoration: none; font-size: 0.875rem; }
.pagination a:hover { background: var(--primary); color: white; border-color: var(--primary); }