/**
 * Synder Design System — CSS Design Tokens
 * Generated from Figma UI_kit_product (node 102-17)
 * Source: https://www.figma.com/design/tSZzqtd28HCrnaY0Ku0Y6z/UI_kit_product
 * Updated: 2026-03-27
 */

/* ============================================================
   COLOR TOKENS
   ============================================================ */

:root {
  /* Primary */
  --color-primary:        #0053cc;
  --color-primary-50:     #80a9e5;
  --color-primary-20:     #ccddf5;
  --color-primary-10:     #e0ebfd;
  --color-primary-5:      #f2f6fc;

  /* Grey scale */
  --color-grey:           #1a1b24;   /* near-black, body text */
  --color-grey-50:        #6b778c;   /* secondary text */
  --color-grey-30:        #b4bbcb;   /* placeholder / disabled text */
  --color-grey-20:        #dfe4ec;   /* borders */
  --color-grey-10:        #eff1f5;   /* subtle backgrounds */
  --color-grey-5:         #f7f8fa;   /* page background */
  --color-white:          #ffffff;

  /* Semantic — Status */
  --color-red:            #cc2929;
  --color-red-light:      #ffece8;
  --color-green:          #1f8940;
  --color-green-light:    #ecfddc;
  --color-yellow:         #cb7515;
  --color-yellow-light:   #fff1dd;
  --color-blue:           #3c4eac;
  --color-blue-light:     #d6ebff;
  --color-purple:         #310bb0;
  --color-purple-light:   #e2d7ff;

  /* Misc */
  --color-selection:      #7b61ff;

  /* Elevation */
  --shadow-elevation-1:   0 7px 14px rgba(129, 142, 165, 0.25);

  /* ============================================================
     TYPOGRAPHY TOKENS
     ============================================================ */

  --font-family:          'Roboto', sans-serif;

  /* H1 */
  --text-h1-size:         28px;
  --text-h1-weight:       400;
  --text-h1-line-height:  36px;

  /* H2 */
  --text-h2-size:         20px;
  --text-h2-weight:       400;
  --text-h2-line-height:  28px;

  /* Subtitle 1 — semibold */
  --text-subtitle1-size:        16px;
  --text-subtitle1-weight:      600;
  --text-subtitle1-line-height: 24px;

  /* Subtitle 2 — bold */
  --text-subtitle2-size:        14px;
  --text-subtitle2-weight:      700;
  --text-subtitle2-line-height: 20px;

  /* Body 1 */
  --text-body1-size:      16px;
  --text-body1-weight:    400;
  --text-body1-line-height: 24px;

  /* Body 2 */
  --text-body2-size:      14px;
  --text-body2-weight:    400;
  --text-body2-line-height: 20px;

  /* Caption */
  --text-caption-size:    12px;
  --text-caption-weight:  400;
  --text-caption-line-height: 16px;

  /* Chip */
  --text-chip-size:       13px;
  --text-chip-weight:     400;
  --text-chip-line-height: 20px;
}

/* ============================================================
   TYPOGRAPHY CLASSES
   ============================================================ */

.text-h1 {
  font-family: var(--font-family);
  font-size: var(--text-h1-size);
  font-weight: var(--text-h1-weight);
  line-height: var(--text-h1-line-height);
}
.text-h2 {
  font-family: var(--font-family);
  font-size: var(--text-h2-size);
  font-weight: var(--text-h2-weight);
  line-height: var(--text-h2-line-height);
}
.text-subtitle1 {
  font-family: var(--font-family);
  font-size: var(--text-subtitle1-size);
  font-weight: var(--text-subtitle1-weight);
  line-height: var(--text-subtitle1-line-height);
}
.text-subtitle2 {
  font-family: var(--font-family);
  font-size: var(--text-subtitle2-size);
  font-weight: var(--text-subtitle2-weight);
  line-height: var(--text-subtitle2-line-height);
}
.text-body1 {
  font-family: var(--font-family);
  font-size: var(--text-body1-size);
  font-weight: var(--text-body1-weight);
  line-height: var(--text-body1-line-height);
}
.text-body2 {
  font-family: var(--font-family);
  font-size: var(--text-body2-size);
  font-weight: var(--text-body2-weight);
  line-height: var(--text-body2-line-height);
}
.text-caption {
  font-family: var(--font-family);
  font-size: var(--text-caption-size);
  font-weight: var(--text-caption-weight);
  line-height: var(--text-caption-line-height);
}
.text-chip {
  font-family: var(--font-family);
  font-size: var(--text-chip-size);
  font-weight: var(--text-chip-weight);
  line-height: var(--text-chip-line-height);
}
.text-body1-link {
  font-family: var(--font-family);
  font-size: var(--text-body1-size);
  font-weight: var(--text-body1-weight);
  line-height: var(--text-body1-line-height);
  color: var(--color-primary);
  text-decoration: underline;
}
.text-body2-link {
  font-family: var(--font-family);
  font-size: var(--text-body2-size);
  font-weight: var(--text-body2-weight);
  line-height: var(--text-body2-line-height);
  color: var(--color-primary);
  text-decoration: underline;
}
.text-body2-dotted {
  font-family: var(--font-family);
  font-size: var(--text-body2-size);
  font-weight: var(--text-body2-weight);
  line-height: var(--text-body2-line-height);
  border-bottom: 1px dashed var(--color-grey-30);
  cursor: help;
}

/* ============================================================
   BASE RESET & GLOBAL
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  font-size: var(--text-body2-size);
  font-weight: var(--text-body2-weight);
  line-height: var(--text-body2-line-height);
  color: var(--color-grey);
  background: var(--color-grey-5);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  font-family: var(--font-family);
  font-size: var(--text-body2-size);
  font-weight: 500;
  line-height: var(--text-body2-line-height);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn-sm {
  padding: 6px 12px;
  font-size: var(--text-caption-size);
}

/* Primary */
.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background: #004ab8;
  border-color: #004ab8;
}
.btn-primary:active {
  background: #003d99;
}

/* Outline */
.btn-outline {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary-5);
}

/* Ghost / Secondary */
.btn-ghost {
  background: var(--color-white);
  color: var(--color-grey-50);
  border-color: var(--color-grey-20);
}
.btn-ghost:hover {
  background: var(--color-grey-5);
  border-color: var(--color-grey-30);
}

/* Danger */
.btn-danger {
  background: var(--color-red);
  color: var(--color-white);
  border-color: var(--color-red);
}
.btn-danger:hover {
  background: #b52424;
}

/* Disabled */
.btn:disabled,
.btn-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */

.input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
select,
textarea {
  font-family: var(--font-family);
  font-size: var(--text-body2-size);
  color: var(--color-grey);
  background: var(--color-white);
  border: 1px solid var(--color-grey-20);
  border-radius: 6px;
  padding: 7px 10px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.input:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-10);
}
.input::placeholder {
  color: var(--color-grey-30);
}

/* ============================================================
   BADGES / STATUS CHIPS
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: var(--text-caption-size);
  font-weight: 500;
  line-height: var(--text-caption-line-height);
  white-space: nowrap;
}
.badge-primary   { background: var(--color-primary-10);    color: var(--color-primary); }
.badge-success   { background: var(--color-green-light);   color: var(--color-green); }
.badge-error     { background: var(--color-red-light);     color: var(--color-red); }
.badge-warning   { background: var(--color-yellow-light);  color: var(--color-yellow); }
.badge-info      { background: var(--color-blue-light);    color: var(--color-blue); }
.badge-purple    { background: var(--color-purple-light);  color: var(--color-purple); }
.badge-neutral   { background: var(--color-grey-10);       color: var(--color-grey-50); }

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--color-white);
  border: 1px solid var(--color-grey-20);
  border-radius: 8px;
  padding: 20px;
}
.card-elevated {
  background: var(--color-white);
  border-radius: 8px;
  box-shadow: var(--shadow-elevation-1);
}

/* ============================================================
   TABLES
   ============================================================ */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-body2-size);
}
.table th {
  text-align: left;
  font-size: var(--text-caption-size);
  font-weight: 500;
  color: var(--color-grey-50);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 10px 12px;
  background: var(--color-grey-5);
  border-bottom: 1px solid var(--color-grey-20);
}
.table td {
  padding: 12px;
  border-bottom: 1px solid var(--color-grey-10);
  color: var(--color-grey);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--color-primary-5); }

/* ============================================================
   TABS
   ============================================================ */

.tabs-bar {
  display: flex;
  align-items: center;
  border-bottom: 2px solid var(--color-grey-10);
}
.tab {
  padding: 10px 16px;
  font-size: var(--text-body2-size);
  font-weight: 400;
  color: var(--color-grey-50);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.tab:hover { color: var(--color-grey); }
.tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 500;
}

/* ============================================================
   SIDEBAR (App shell)
   ============================================================ */

.sidebar {
  width: 220px;
  background: var(--color-grey);   /* #1a1b24 */
  color: var(--color-white);
  padding: 16px 0;
  flex-shrink: 0;
}
.nav-item {
  padding: 10px 16px 10px 20px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.65);
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--color-white);
}
.nav-item.active {
  background: rgba(0, 83, 204, 0.22);
  color: var(--color-white);
  border-left: 3px solid var(--color-primary);
  padding-left: 17px;
}

/* ============================================================
   TOPBAR
   ============================================================ */

.topbar {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-grey-20);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */

.page-title {
  font-size: var(--text-h1-size);
  font-weight: 600;
  line-height: var(--text-h1-line-height);
  color: var(--color-grey);
}
.page-subtitle {
  font-size: var(--text-body2-size);
  color: var(--color-grey-50);
  margin-top: 4px;
}

/* ============================================================
   UTILITY COLOR CLASSES
   ============================================================ */

.text-primary   { color: var(--color-primary); }
.text-secondary { color: var(--color-grey-50); }
.text-muted     { color: var(--color-grey-30); }
.text-success   { color: var(--color-green); }
.text-error     { color: var(--color-red); }
.text-warning   { color: var(--color-yellow); }

.bg-primary-5   { background: var(--color-primary-5); }
.bg-primary-10  { background: var(--color-primary-10); }
.bg-grey-5      { background: var(--color-grey-5); }
.bg-white       { background: var(--color-white); }
