@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #e0e7ff;
  --secondary: #0ea5e9;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Plus Jakarta Sans', sans-serif; }
body { background-color: var(--bg-main); color: var(--text-main); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
.hidden { display: none !important; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ====== BUTTONS ====== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: var(--radius-md); font-weight: 600; cursor: pointer; border: none; transition: all 0.2s ease; font-size: 0.95rem; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); color: white; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-hover); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 2px solid var(--border); color: var(--text-main); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-danger { background: #fee2e2; color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: white; }
.btn-block { width: 100%; }

/* ====== CARDS ====== */
.card { background: var(--bg-card); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); transition: box-shadow 0.3s; }
.card:hover { box-shadow: var(--shadow-lg); }

/* ====== FORMS ====== */
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; color: var(--text-main); }
.field input, .field select, .field textarea { width: 100%; padding: 14px; border: 1.5px solid var(--border); border-radius: var(--radius-md); font-size: 0.95rem; transition: all 0.2s; background: var(--bg-main); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px var(--primary-light); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ====== AUTH PAGE ====== */
.auth-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%); }
.auth-card { background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(20px); padding: 40px; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 440px; border: 1px solid rgba(255,255,255,0.5); }
.auth-tabs { display: flex; background: var(--bg-main); border-radius: var(--radius-md); padding: 6px; margin-bottom: 24px; }
.auth-tab { flex: 1; padding: 10px; border: none; background: transparent; font-weight: 600; cursor: pointer; border-radius: 8px; color: var(--text-muted); transition: 0.3s; }
.auth-tab.active { background: white; color: var(--primary); box-shadow: var(--shadow-sm); }

/* ====== APP LAYOUT (Dashboard) ====== */
.app-body { display: flex; min-height: 100vh; background: var(--bg-main); }
.sidebar { width: 280px; background: white; border-right: 1px solid var(--border); padding: 24px; display: flex; flex-direction: column; position: fixed; height: 100%; z-index: 10; }
.sidebar .brand { font-size: 1.4rem; font-weight: 800; margin-bottom: 40px; display: flex; align-items: center; gap: 12px; color: var(--primary); }
.side-nav { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.side-nav a { padding: 14px 16px; border-radius: var(--radius-md); color: var(--text-muted); font-weight: 600; display: flex; align-items: center; gap: 12px; transition: 0.2s; }
.side-nav a:hover, .side-nav a.active { background: var(--primary-light); color: var(--primary); }
.main { flex: 1; margin-left: 280px; padding: 40px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }

/* ====== TABLES ====== */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: 16px; font-size: 0.85rem; text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.table td { padding: 16px; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.table select { padding: 8px; border-radius: 8px; border: 1px solid var(--border); font-weight: 600; }

/* ====== STATUS BADGES ====== */
.badge { padding: 6px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; }
.badge-pending { background: #fef3c7; color: #b45309; }
.badge-progress { background: #e0f2fe; color: #0369a1; }
.badge-done { background: #dcfce7; color: #15803d; }

/* ====== CHAT WIDGET ====== */
.chat-container { display: flex; flex-direction: column; height: 400px; }
.chat-box { flex: 1; overflow-y: auto; padding: 16px; background: var(--bg-main); border-radius: var(--radius-md); display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; border: 1px solid var(--border); }
.chat-msg { max-width: 75%; padding: 12px 16px; border-radius: 16px; font-size: 0.95rem; box-shadow: var(--shadow-sm); }
.chat-me { align-self: flex-end; background: var(--primary); color: white; border-bottom-right-radius: 4px; }
.chat-them { align-self: flex-start; background: white; border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-input { display: flex; gap: 12px; }
