:root {
  --navy: #14263f;
  --navy-light: #1d3557;
  --gold: #c9a227;
  --gold-light: #e5c55c;

  --slate: #5b6b7c;
  --slate-dark: #364454;

  --line: #d9dee7;
  --bg: #f5f3ef;
  --white: #ffffff;

  --ok: #1a7f4b;
  --err: #b91c1c;

  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}


/* -----------------------------
   Base
------------------------------ */

* {
  box-sizing: border-box;
}


body {
  margin: 0;
  font-family: var(--font);
  color: var(--navy);
  background: var(--bg);
}


.hidden {
  display: none !important;
}


a {
  color: inherit;
}


/* -----------------------------
   Buttons
------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;

  padding: .6rem 1rem;

  border-radius: var(--radius);

  border: 1px solid var(--line);

  background: var(--white);

  font: inherit;
  font-weight: 600;

  cursor: pointer;

  text-decoration: none;

  transition:
    background .2s ease,
    border-color .2s ease,
    color .2s ease,
    transform .15s ease,
    box-shadow .15s ease;
}


.btn:hover {
  border-color: var(--gold);
  box-shadow: 0 3px 12px rgba(20,38,63,.12);
}


.btn:active {
  transform: translateY(1px);
}


.btn-primary {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}


.btn-primary:hover {
  background: var(--navy-light);
  border-color: var(--navy-light);
}


.btn-google {
  background: #fff;
  width: 100%;
  border: 1px solid #d4d9e2;
}


.btn-google:hover {
  border-color: var(--gold);
  background: #fffdf7;
}


.btn-ghost {
  background: transparent;
}


.btn-danger {
  color: var(--err);
  border-color: #f0c8c8;
}


.btn-danger:hover {
  background: #fff5f5;
}


/* -----------------------------
   Login
------------------------------ */


.login {

  min-height: 100vh;

  display: grid;

  place-items: center;

  padding: 1rem;

}



.login-card {

  background: var(--white);

  border: 1px solid var(--line);

  border-radius: 16px;

  padding: 2rem;

  width: 100%;

  max-width: 380px;

  box-shadow:
    0 10px 35px rgba(20,38,63,.12);

}



.login-card h1 {

  font-size: 1.35rem;

  margin: 0 0 1.5rem;

  color: var(--navy);

}


/* divider */

.divider {

  text-align:center;

  color:var(--slate);

  margin:1.2rem 0;

  position:relative;

}


.divider::before {

  content:"";

  position:absolute;

  top:50%;

  left:0;

  right:0;

  height:1px;

  background:var(--line);

}


.divider span {

  background:var(--white);

  padding:0 .7rem;

  position:relative;

  font-size:.8rem;

}



/* -----------------------------
   Forms
------------------------------ */


form label {

  display:block;

  font-size:.82rem;

  font-weight:700;

  margin-bottom:.9rem;

  color:var(--slate-dark);

}



form input,
form select,
form textarea {


  display:block;

  width:100%;


  margin-top:.35rem;


  padding:.65rem .75rem;


  border:

    1px solid #cbd3df;


  border-radius:8px;


  font:inherit;


  color:var(--navy);


  background:#fff;


  transition:

    border-color .2s ease,

    box-shadow .2s ease,

    background .2s ease;

}



form input:hover,
form select:hover,
form textarea:hover {

  border-color:#aeb9c9;

}



form input:focus,
form select:focus,
form textarea:focus {


  outline:none;


  border-color:var(--gold);


  background:#fffdf8;


  box-shadow:

    0 0 0 3px rgba(201,162,39,.18);

}



form textarea {

  min-height:120px;

  resize:vertical;

}



.error {

  color:var(--err);

  font-size:.82rem;

  min-height:1.2em;

}



/* -----------------------------
   App shell
------------------------------ */


.topbar {


  display:flex;

  align-items:center;

  gap:.7rem;


  background:var(--white);


  border-bottom:

    1px solid var(--line);


  padding:.7rem 1.2rem;


  position:sticky;


  top:0;


  z-index:5;


  box-shadow:

    0 2px 10px rgba(20,38,63,.06);

}



.topbar strong {

  color:var(--navy);

  font-size:1rem;

}



.topbar .spacer {

  flex:1;

}



.who {

  font-size:.82rem;

  color:var(--slate);

}



/* layout */


.layout {


  display:grid;


  grid-template-columns:220px 1fr;


  min-height:calc(100vh - 55px);


}



.nav {


  border-right:

    1px solid var(--line);


  background:var(--white);


  padding:1rem .7rem;


}



.nav button {


  display:block;


  width:100%;


  text-align:left;


  padding:.65rem .8rem;


  margin-bottom:.25rem;


  border:none;


  background:transparent;


  border-radius:8px;


  font:inherit;


  font-weight:600;


  color:var(--slate);


  cursor:pointer;


  transition:

    background .2s,

    color .2s;

}



.nav button:hover {


  background:#f4f1e8;


  color:var(--navy);

}



.nav button.active {


  background:var(--navy);


  color:#fff;

}




.main {


  padding:1.8rem;


  max-width:950px;

}



.main h2 {

  margin:0 0 1.2rem;

}



/* -----------------------------
   Cards / Panels
------------------------------ */


.panel {


  background:var(--white);


  border:

    1px solid var(--line);


  border-radius:14px;


  padding:1.35rem;


  margin-bottom:1.5rem;


  box-shadow:

    0 3px 15px rgba(20,38,63,.05);

}



.panel h3 {


  margin:0 0 1rem;


  font-size:1rem;


  color:var(--navy);

}




.grid2 {


  display:grid;


  grid-template-columns:1fr 1fr;


  gap:0 1rem;

}



.full {


  grid-column:1/-1;

}



.row-actions {


  display:flex;


  gap:.6rem;


  margin-top:.7rem;

}



/* -----------------------------
   Lists
------------------------------ */


.list {


  list-style:none;


  margin:0;


  padding:0;

}



.list li {


  display:flex;


  align-items:center;


  gap:.75rem;


  padding:.75rem 0;


  border-bottom:1px solid var(--line);

}



.list li:last-child {

  border-bottom:none;

}



.list .li-title {


  font-weight:700;

}



.list .li-sub {


  font-size:.78rem;


  color:var(--slate);

}



.list .li-spacer {

  flex:1;

}



.thumb {


  width:46px;


  height:46px;


  border-radius:8px;


  object-fit:cover;


  background:#eee;

}




/* -----------------------------
   Toast
------------------------------ */


.toast {


  position:fixed;


  bottom:1.25rem;


  left:50%;


  transform:translateX(-50%);


  background:var(--navy);


  color:#fff;


  padding:.7rem 1.1rem;


  border-radius:10px;


  font-size:.85rem;


  z-index:20;


  box-shadow:

    0 8px 25px rgba(0,0,0,.18);

}



.toast.err {

  background:var(--err);

}



/* -----------------------------
   Quill editor
------------------------------ */


.rich-editor {


  background:white;


  min-height:300px;


  border:1px solid #cbd3df;


  border-radius:8px;


  overflow:hidden;

}



.ql-toolbar.ql-snow {


  border-color:#cbd3df;

  background:#faf9f6;

}



.ql-container.ql-snow {


  border-color:#cbd3df;

}



.ql-editor {


  min-height:250px;


  font-size:1rem;


  line-height:1.6;

}



.ql-editor:focus {


  background:#fffdf8;

}



/* -----------------------------
   Responsive
------------------------------ */


@media(max-width:720px){


.layout {

  grid-template-columns:1fr;

}



.nav {


  display:flex;


  flex-wrap:wrap;


  border-right:none;


  border-bottom:1px solid var(--line);

}



.nav button {

  width:auto;

}



.grid2 {

  grid-template-columns:1fr;

}


}