/* === Reset & Base === */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', 'Hiragino Sans', sans-serif; background: #f5f7fa; color: #333; display: flex; min-height: 100vh; }

/* === Sidebar === */
.sidebar { width: 240px; background: #1a1a2e; color: #fff; position: fixed; height: 100vh; overflow-y: auto; }
.sidebar-header { padding: 24px 20px 12px; border-bottom: 1px solid #333; }
.sidebar-header h2 { font-size: 20px; color: #4fc3f7; }
.sidebar-header .subtitle { font-size: 11px; color: #888; }
.nav-menu { list-style: none; padding: 12px 0; }
.nav-menu li a { display: block; padding: 10px 20px; color: #ccc; text-decoration: none; font-size: 14px; transition: background 0.2s; }
.nav-menu li a:hover, .nav-menu li a.active { background: #16213e; color: #4fc3f7; }
.nav-menu .icon { margin-right: 8px; }
.nav-section { padding: 16px 20px 4px; font-size: 11px; color: #666; text-transform: uppercase; letter-spacing: 1px; }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid #333; display: flex; flex-direction: column; gap: 8px; }

/* === Main Content === */
.content { margin-left: 240px; padding: 24px 32px; flex: 1; max-width: 1200px; }

/* === Flash Messages === */
.flash-messages { margin-bottom: 20px; }
.flash { padding: 12px 16px; border-radius: 6px; margin-bottom: 8px; font-size: 14px; }
.flash-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.flash-error { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.flash-info { background: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb; }
.flash-warning { background: #fff3e0; color: #e65100; border: 1px solid #ffe0b2; }

/* === Cards === */
.card { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); padding: 20px; margin-bottom: 16px; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-header h2 { font-size: 18px; color: #1a1a2e; }
.card-header h3 { font-size: 16px; color: #333; }

/* === Buttons === */
.btn { display: inline-block; padding: 8px 16px; border-radius: 6px; border: none; cursor: pointer; font-size: 14px; text-decoration: none; transition: all 0.2s; }
.btn-primary { background: #4fc3f7; color: #fff; }
.btn-primary:hover { background: #039be5; }
.btn-success { background: #66bb6a; color: #fff; }
.btn-success:hover { background: #43a047; }
.btn-danger { background: #ef5350; color: #fff; }
.btn-danger:hover { background: #d32f2f; }
.btn-warning { background: #ffa726; color: #fff; }
.btn-warning:hover { background: #f57c00; }
.btn-small { font-size: 12px; padding: 4px 10px; border-radius: 4px; background: #333; color: #aaa; text-decoration: none; text-align: center; }
.btn-small.btn-primary { background: #4fc3f7; color: #fff; }
.btn-group { display: flex; gap: 8px; }

/* === Tables === */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; font-size: 14px; }
th { background: #f5f7fa; font-weight: 600; color: #555; font-size: 12px; text-transform: uppercase; }
tr:hover { background: #fafbfc; }

/* === Forms === */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 4px; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; font-family: inherit;
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none; border-color: #4fc3f7; box-shadow: 0 0 0 3px rgba(79,195,247,0.15);
}

/* === Badges === */
.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.badge-pending { background: #fff3e0; color: #e65100; }
.badge-approved { background: #e8f5e9; color: #2e7d32; }
.badge-rejected { background: #ffebee; color: #c62828; }
.badge-new { background: #e3f2fd; color: #1565c0; }
.badge-active { background: #e8f5e9; color: #2e7d32; }

/* === Stats === */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 8px; padding: 16px 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: #1a1a2e; }
.stat-card .stat-label { font-size: 12px; color: #888; margin-top: 4px; }

/* === AI Content Preview === */
.ai-content { background: #f8f9ff; border: 1px solid #e0e4ff; border-radius: 6px; padding: 16px; margin: 12px 0; white-space: pre-wrap; font-size: 14px; line-height: 1.6; }
.ai-content-header { font-size: 12px; color: #666; margin-bottom: 8px; font-weight: 600; }

/* === Page Header === */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.page-header h1 { font-size: 24px; color: #1a1a2e; }

/* === Copy Button === */
.copy-btn { cursor: pointer; background: #eee; border: 1px solid #ddd; padding: 4px 10px; border-radius: 4px; font-size: 12px; }
.copy-btn:hover { background: #ddd; }

/* === Language Switcher === */
.lang-switcher { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-top: 1px solid #2a2a4a; }
.lang-icon { font-size: 16px; }
.lang-switcher select { background: #2a2a4a; color: #ccc; border: 1px solid #444; border-radius: 6px; padding: 5px 10px; font-size: 13px; cursor: pointer; flex: 1; }
.lang-switcher select:hover { border-color: #4fc3f7; color: #fff; }
.lang-switcher select:focus { outline: none; border-color: #4fc3f7; }
