/* ===== OFFICINE TIS — Design System ===== */
:root {
  --teal:       #1D9E75;
  --teal-dark:  #0F6E56;
  --teal-light: #E1F5EE;
  --teal-mid:   #9FE1CB;
  --amber:      #F59E0B;
  --red:        #E53935;
  --bg-page:    #F4F5F7;
  --bg-card:    #FFFFFF;
  --text-1:     #1A1A18;
  --text-2:     #6B6B67;
  --border:     rgba(0,0,0,0.08);
  --radius:     10px;
  --radius-lg:  14px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.08);
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-page);
  color: var(--text-1);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
}

/* ===== HEADER / ENTETE ===== */
.app-header {
  background: var(--bg-card);
  border-bottom: 0.5px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo {
  width: 38px; height: 38px;
  background: var(--teal);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.header-logo svg { width: 20px; height: 20px; fill: white; }

.header-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-1);
}
.header-subtitle {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 1px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-date {
  font-size: 12px;
  color: var(--text-2);
  background: var(--bg-page);
  border: 0.5px solid var(--border);
  padding: 5px 12px;
  border-radius: 99px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
}
.header-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--teal-light);
  color: var(--teal-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

/* ===== NAVBAR / MENU ===== */
.app-nav {
  background: var(--bg-card);
  border-bottom: 0.5px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.app-nav::-webkit-scrollbar { display: none; }

/* Override Bootstrap dropdown buttons */
.app-nav .btn-group { margin: 0; }

.app-nav .btn.btn-success.dropdown-toggle {
  background: transparent !important;
  border: none !important;
  color: var(--text-2) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding: 14px 14px !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border-bottom: 2px solid transparent !important;
  transition: all 0.15s !important;
  white-space: nowrap;
}
.app-nav .btn.btn-success.dropdown-toggle:hover,
.app-nav .btn.btn-success.dropdown-toggle:focus {
  background: var(--teal-light) !important;
  color: var(--teal-dark) !important;
  border-bottom-color: var(--teal) !important;
}

.app-nav .dropdown-menu {
  border: 0.5px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-md) !important;
  padding: 6px !important;
  min-width: 220px !important;
  margin-top: 2px !important;
}
.app-nav .dropdown-menu > li > a {
  font-size: 13px !important;
  color: var(--text-1) !important;
  padding: 7px 12px !important;
  border-radius: 6px !important;
  display: block;
  transition: background 0.12s;
}
.app-nav .dropdown-menu > li > a:hover {
  background: var(--teal-light) !important;
  color: var(--teal-dark) !important;
  text-decoration: none;
}
.app-nav .dropdown-menu > li + li > a { margin-top: 1px; }

/* ===== TICKER / MARQUEE ===== */
.user-ticker {
  background: var(--teal-light);
  border-bottom: 0.5px solid rgba(29,158,117,0.2);
  padding: 6px 0;
  font-size: 12px;
  color: var(--teal-dark);
  overflow: hidden;
}
.user-ticker > div {
  display: inline-block;
  padding-left: 100%;
  white-space: nowrap;
  animation: ticker 20s linear infinite;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* ===== MAIN CONTENT ===== */
.app-main {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* ===== ALERTS ===== */
.alert-modern {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
}
.alert-modern.success {
  background: var(--teal-light);
  color: var(--teal-dark);
  border: 0.5px solid rgba(29,158,117,0.25);
}
.alert-modern.danger {
  background: #FEECEC;
  color: #B91C1C;
  border: 0.5px solid rgba(229,57,53,0.25);
}
.alert-modern .alert-icon {
  width: 18px; height: 18px; flex-shrink: 0;
}

/* ===== LOGIN PAGE ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0faf5 0%, #e8f4fd 100%);
}
.login-card {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 400px;
  box-shadow: var(--shadow-md);
}
.login-logo {
  width: 52px; height: 52px;
  background: var(--teal);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
}
.login-logo svg { width: 28px; height: 28px; fill: white; }
.login-title {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.login-sub {
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 2rem;
}
.form-field { margin-bottom: 1rem; }
.form-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-field input {
  width: 100%;
  padding: 10px 14px;
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-1);
  background: var(--bg-page);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-field input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(29,158,117,0.12);
  background: white;
}
.btn-login {
  width: 100%;
  padding: 11px;
  background: var(--teal);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.15s, transform 0.1s;
}
.btn-login:hover { background: var(--teal-dark); }
.btn-login:active { transform: scale(0.99); }
.login-footer {
  text-align: center;
  font-size: 11px;
  color: var(--text-2);
  margin-top: 1.5rem;
}

/* ===== WELCOME PAGE ===== */
.welcome-banner {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.welcome-icon {
  width: 56px; height: 56px;
  background: var(--teal-light);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.welcome-icon svg { width: 28px; height: 28px; fill: var(--teal); }
.welcome-greeting { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--teal); font-weight: 600; }
.welcome-name { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin: 2px 0; }
.welcome-detail { font-size: 13px; color: var(--text-2); }

/* ===== FOOTER ===== */
.app-footer {
  background: var(--bg-card);
  border-top: 0.5px solid var(--border);
  padding: 14px 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-2);
  margin-top: 3rem;
}
.footer-brand { font-weight: 600; color: var(--teal); }
