/* ================= BODY ================= */

html,
body {
    margin: 0;
    width: 100%;
    min-height: 100%;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: #0b1220;
    color: #cbd5e1;
    overflow: hidden;
}

/* ================= OVERLAY / WEB ROOT ================= */

#mdt-container {
    position: fixed;
    inset: 0;
    display: none;
    background: linear-gradient(180deg, #091224 0%, #0b1730 100%);
}

#mdt-container.active {
    display: block;
}

/* ================= APP WRAPPER ================= */

#mdt-app-wrapper {
    position: relative;
    width: 100vw;
    height: 100vh;
    min-width: 0;
    min-height: 0;
    display: flex;
    overflow: hidden;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

/* compat ancien mode tablet si jamais un vieux screen l’utilise encore */
#tablet {
    position: relative;
    width: 100vw;
    height: 100vh;
    min-width: 0;
    min-height: 0;
    display: flex;
    overflow: hidden;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

/* ================= LOGIN / APP ================= */

#login-screen,
#mdt-app {
    position: absolute;
    inset: 0;
    min-width: 0;
    min-height: 0;
}

#login-screen {
    display: flex;
}

#mdt-app {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* ================= SIDEBAR ================= */

#sidebar {
    width: 240px;
    background: linear-gradient(180deg, #0b162b 0%, #0a1324 100%);
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,0.05);
}

.sidebar-logo {
    font-weight: 600;
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 35px;
}

.sidebar-item {
    padding: 12px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 6px;
    color: #94a3b8;
    transition: 0.2s;
}

.sidebar-item:hover {
    background: rgba(255,255,255,0.04);
    color: #ffffff;
}

.sidebar-item.active {
    background: linear-gradient(90deg, #1d4ed8, #2563eb);
    color: white;
}

/* ================= MAIN CONTENT ================= */

#main-content {
    flex: 1;
    min-width: 0;
    min-height: 0;
    padding: 35px;
    background: linear-gradient(180deg, #0f1d38 0%, #0c1730 100%);
    overflow-y: auto;
    overflow-x: hidden;
}

/* ================= TITLES ================= */

h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #ffffff;
}

p {
    font-size: 14px;
    color: #94a3b8;
}

/* ================= CARDS ================= */

.card {
    background: linear-gradient(180deg, #16233f 0%, #121c34 100%);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.03);
    margin-bottom: 20px;
}

/* ================= SCROLLBAR ================= */

#main-content::-webkit-scrollbar {
    width: 6px;
}

#main-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
}

/* ================= ANIMATION ================= */

@keyframes tabletOpen {
    from {
        transform: scale(0.96);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.mdt-notifications {
    position: fixed;
    top: 20px;
    right: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 999999;
}

.mdt-notify {
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    animation: slideIn 0.25s ease;
    min-width: 250px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}

.mdt-notify.success {
    background: linear-gradient(90deg, #16a34a, #22c55e);
    color: black;
}

.mdt-notify.error {
    background: linear-gradient(90deg, #991b1b, #dc2626);
    color: white;
}

.mdt-notify.hide {
    opacity: 0;
    transform: translateX(30px);
    transition: 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ================= LOGIN LAYOUT ================= */

.login-screen {
    flex: 1;
    display: flex;
    height: 100%;
    background: radial-gradient(circle at top, #1e293b, #0a1428);
}

.login-layout {
    display: flex;
    width: 100%;
    height: 100%;
}

.login-sidebar h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.login-sidebar p {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 25px;
}

.login-separator {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 20px 0;
}

/* RIGHT SIDE */

.login-content {
    flex: 1;
    padding: 60px 80px;
    overflow-y: auto;
}

.login-content h1 {
    font-size: 30px;
    margin-bottom: 8px;
}

.login-content p {
    color: #94a3b8;
    margin-bottom: 40px;
}

/* GRID */

.login-departments {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* CARD */

.login-card {
    background: linear-gradient(180deg, #16233f, #0f172a);
    border-radius: 18px;
    padding: 30px;
    border: 1px solid rgba(255,255,255,0.04);
    transition: 0.25s ease;
}

.login-card:hover {
    transform: translateY(-6px);
    border-color: rgba(59,130,246,0.6);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.login-card img {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    margin-bottom: 20px;
}

.login-card h3 {
    margin-bottom: 6px;
}

.login-card button {
    margin-top: 18px;
    padding: 9px 16px;
    border-radius: 10px;
    background: linear-gradient(90deg,#2563eb,#1d4ed8);
    border: none;
    color: white;
    cursor: pointer;
    transition: 0.2s;
}

.login-card button:hover {
    background: linear-gradient(90deg,#3b82f6,#2563eb);
}

/* ================= LOGIN SIDEBAR ================= */

.login-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #0b162b 0%, #0a1324 100%);
    border-right: 1px solid rgba(255,255,255,0.05);
    padding: 60px 30px;
    display: flex;
    flex-direction: column;
}

.login-brand h2 {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 6px;
}

.login-brand p {
    font-size: 13px;
    color: #94a3b8;
}

.login-separator {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 35px 0;
}

.login-info h4 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.login-info p {
    font-size: 13px;
    line-height: 1.6;
    color: #94a3b8;
}

.login-warning {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.3);
    font-size: 12px;
    color: #cbd5e1;
}

/* ================= LOGIN SCROLLBAR ================= */

.login-content::-webkit-scrollbar {
    width: 4px;
}

.login-content::-webkit-scrollbar-thumb {
    background: rgba(59,130,246,0.4);
    border-radius: 10px;
}

.login-content::-webkit-scrollbar-track {
    background: transparent;
}

.login-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.18);
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
}

#mdt-container.web-mode,
#mdt-container {
  display: block;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  padding: 0;
}

#mdt-container.web-mode.hidden {
  display: block !important;
}

#mdt-app-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

#tablet {
  width: 100vw;
  height: 100vh;
  min-width: 0;
  min-height: 0;
  border-radius: 0;
  box-shadow: none;
}

/* ================= WEB APP WRAPPER ================= */

#tablet {
  width: 100%;
  height: 100%;
}

#login-screen,
#mdt-app {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
}

#login-screen {
  display: flex;
}

#mdt-app {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#mdt-container.web-mode {
  display: flex !important;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 24px;
  box-sizing: border-box;
}

#mdt-container.web-mode.hidden {
  display: flex !important;
}