/* assets/app.css – CRM / admin / student felület
   Cél: ugyanaz a brand-hangulat, mint az auth.css (türkiz-kék + világos alap),
   csak alkalmazás/CRM elrendezéssel.
*/

:root{
  --brand1: #246780;
  --brand2: #1d809f;
  --accent: #35c2b2;

  --bg: #f6f7f8;
  --panel: #ffffff;
  --card: #ffffff;

  --text: #0f172a;
  --muted: rgba(15, 23, 42, 0.65);

  --border: #d8dfe6;
  --shadow: 0 12px 28px rgba(0,0,0,0.10);

  --danger-bg: #ffe9e9;
  --danger-bd: #ffb3b3;
  --danger-tx: #7a1f1f;

  --ok-bg: #f3fbfa;
  --ok-bd: rgba(53,194,178,0.35);
  --ok-tx: #0f3b36;

  --radius: 14px;
}

*{ box-sizing: border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

/* Linkek */
a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: underline; }

/* ====== Layout ====== */
.crm{
  min-height:100vh;
  display:flex;
}

/* ====== Sidebar ====== */
.sidebar{
  width: 280px;
  background: linear-gradient(180deg, var(--brand1) 0%, var(--brand2) 70%, rgba(29,128,159,0.96) 100%);
  border-right: 1px solid rgba(255,255,255,0.14);
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  padding: 10px 10px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}

.brand img{
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(255,255,255,0.14);
}

.brand .t1{
  font-weight: 800;
  letter-spacing: .2px;
  color: #fff;
  font-size: 16px;
}

.brand .t2{
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  margin-top: 2px;
}

/* Nav */
.nav{
  margin-top: 14px;
  display:flex;
  flex-direction:column;
  gap: 10px;
}

.nav a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.95);
  background: rgba(255,255,255,0.06);
}

.nav a:hover{
  background: rgba(255,255,255,0.10);
  text-decoration:none;
}

.nav a.active{
  border-color: rgba(53,194,178,0.55);
  background: rgba(53,194,178,0.18);
}

.badge{
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.10);
}

/* ====== Main + Topbar ====== */
.main{
  flex:1;
  display:flex;
  flex-direction:column;
}

/* Topbar: auth-hoz hasonló “felső színes sáv” érzet */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.top-left{
  display:flex;
  align-items:center;
  gap: 10px;
}

.burger{
  display:none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  cursor:pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}
.burger:hover{
  background: #f8fbff;
}

.page-title{
  display:flex;
  flex-direction:column;
}

.page-title h1{
  margin:0;
  font-size: 18px;
  color: #0f172a;
}

.page-title .sub{
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.top-right{
  display:flex;
  align-items:center;
  gap: 10px;
}

.pill{
  border: 1px solid var(--border);
  background: #fff;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.70);
}

/* ====== Buttons ====== */
.btn{
  border: 0;
  background: linear-gradient(135deg, var(--brand2), var(--accent));
  color: white;
  font-weight: 800;
  padding: 10px 12px;
  border-radius: 12px;
  cursor:pointer;
  box-shadow: 0 10px 22px rgba(29,128,159,0.18);
}
.btn:hover{ filter: brightness(1.03); }

.btn.secondary{
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(0,0,0,0.06);
}

.btn.danger{
  background: var(--danger-bg);
  border: 1px solid var(--danger-bd);
  color: var(--danger-tx);
  font-weight: 800;
  box-shadow: none;
}

/* ====== Content ====== */
.content{
  padding: 18px;
  max-width: 1180px;
}

.card{
  background: var(--card);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

/* Grid */
.grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 1000px){
  .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px){
  .grid{ grid-template-columns: 1fr; }
}

/* ====== Table ====== */
.table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,0.06);
}

.table th, .table td{
  padding: 10px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  text-align:left;
  font-size: 14px;
}

.table th{
  font-size: 12px;
  letter-spacing: .35px;
  color: rgba(15, 23, 42, 0.55);
  text-transform: uppercase;
  background: #fbfdff;
}

.table tr:hover td{
  background: rgba(53,194,178,0.06);
}

/* ====== Forms ====== */
.form-row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px){
  .form-row{ grid-template-columns: 1fr; }
}

.label{
  display:block;
  font-size: 13px;
  color: rgba(24, 40, 80, 0.85);
  margin-bottom: 6px;
}

.input, .select, .textarea{
  width:100%;
  padding: 12px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  outline: none;
  font-size: 16px;
}

.input:focus, .select:focus, .textarea:focus{
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(53,194,178,0.18);
}

.textarea{
  min-height: 110px;
  resize: vertical;
}

.actions{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap:wrap;
  margin-top: 14px;
}

/* ====== Flash üzenetek ====== */
.flash{
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.06);
  background: #fff;
  margin-bottom: 12px;
  color: var(--text);
  box-shadow: 0 10px 22px rgba(0,0,0,0.06);
}

.flash.ok{
  border-color: var(--ok-bd);
  background: var(--ok-bg);
  color: var(--ok-tx);
  box-shadow: none;
}

.flash.err{
  border-color: var(--danger-bd);
  background: var(--danger-bg);
  color: var(--danger-tx);
  box-shadow: none;
}

hr.sep{
  border:0;
  border-top: 1px solid rgba(0,0,0,0.08);
  margin: 14px 0;
}

/* ====== Mobil sidebar toggle ====== */
@media (max-width: 920px){
  .burger{ display:inline-flex; }

  .sidebar{
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-105%);
    transition: transform .2s ease;
    z-index: 50;
    box-shadow: 0 18px 60px rgba(0,0,0,0.25);
  }

  body.sidebar-open .sidebar{
    transform: translateX(0);
  }

  body.sidebar-open::before{
    content:"";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 40;
  }
}

/* ====== Modal ====== */
.modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
  padding: 18px;
}

.modal{
  width: min(760px, 100%);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: 0 22px 80px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.16);
  overflow: hidden;
}

.modal-header, .modal-footer{
  padding: 14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.modal-footer{
  border-bottom: 0;
  border-top: 1px solid rgba(0,0,0,0.06);
  justify-content:flex-end;
}

.modal-title{
  font-weight: 800;
  font-size: 16px;
}

.modal-body{
  padding: 16px;
  max-height: calc(100vh - 220px);
  overflow: auto;
}

/* “chip” a parenthez */
.chip{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(53,194,178,0.10);
  font-size: 12px;
  font-weight: 700;
}

.subrow td{
  background: rgba(0,0,0,0.02);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  font-size: 13px;
}

