


@import url('https://fonts.googleapis.com/css2?family=Segoe+UI:wght@100;300;400;600;700&display=swap');

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-radius: 0 !important;
  box-shadow: none !important;
}

:root {
  
  --bg:        #121212;
  --surface:   #201F1E;
  --chrome:    #181818;
  --accent:    #A4C400;
  --fg:        #FFFFFF;
  --fg-dim:    #888888;
  --divider:   rgba(255,255,255,0.08);

  
  --font:      'Segoe UI', 'Segoe UI Light', Tahoma, Geneva, sans-serif;

  
  --tile-sq:   150px;   
  --tile-gap:  10px;    
  --tile-wide: 310px;   
  --tile-tall: 310px;   

  
  --hub-margin-left:  120px;
  --hub-section-gap:  60px;
  --nav-height:       56px;
  --appbar-height:    0px;
}

html {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  height: 100%;
  overflow: hidden;
}

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }


.ms-navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background-color: var(--chrome);
  border-bottom: 1px solid var(--divider);
  display: flex;
  align-items: center;
  padding: 0 48px;
  z-index: 900;
  gap: 0;
}


.ms-navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: 48px;
}

.ms-navbar-logo {
  width: 30px;
  height: 30px;
  background-color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.ms-navbar-appname {
  font-size: 22px;
  font-weight: 100;
  letter-spacing: -0.01em;
  text-transform: lowercase;
  color: var(--fg);
}


.ms-nav-items {
  display: flex;
  align-items: stretch;
  height: var(--nav-height);
  gap: 0;
  flex: 1;
}

.ms-nav-item {
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-family: 'Segoe UI Light', 'Segoe UI', Tahoma, sans-serif;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #999;
  text-decoration: none;
  transition: color 120ms, font-size 120ms;
}

.ms-nav-item:hover,
.ms-nav-item.active {
  color: var(--fg);
}

.ms-nav-item.active {
  color: #FFFFFF;
  font-size: 15px;
}


.ms-navbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.ms-navbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
}

.ms-navbar-avatar {
  width: 28px;
  height: 28px;
  border: 1px solid var(--accent);
  overflow: hidden;
  flex-shrink: 0;
}

.ms-navbar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ms-navbar-username {
  font-family: 'Segoe UI Light', 'Segoe UI', Tahoma, sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}


.ms-viewport {
  position: fixed;
  top: var(--nav-height);
  bottom: var(--appbar-height);
  left: 0;
  right: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}


.ms-page-title {
  padding: 20px 0 0 var(--hub-margin-left);
  flex-shrink: 0;
}

.ms-page-title h1 {
  font-size: 42px;
  font-weight: 100;
  color: var(--fg);
  text-transform: lowercase;
  letter-spacing: -0.02em;
  line-height: 1;
}



.ms-hub {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  overflow-x: scroll;
  overflow-y: hidden;
  height: 100%;
  padding-left: var(--hub-margin-left);
  padding-right: 120px;
  padding-top: 20px;
  gap: var(--hub-section-gap);
}


.ms-hub::-webkit-scrollbar { height: 4px; }
.ms-hub::-webkit-scrollbar-track { background: transparent; }
.ms-hub::-webkit-scrollbar-thumb { background-color: var(--accent); }
.ms-hub { scrollbar-width: thin; scrollbar-color: var(--accent) transparent; }



.ms-hub-section {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
  min-width: 0;
}


.ms-hub-section-header {
  font-size: 28px;
  font-weight: 100;
  color: var(--fg-dim);
  text-transform: lowercase;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  flex-shrink: 0;
}


.ms-hub-section-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}

.ms-hub-section-body::-webkit-scrollbar { width: 3px; }
.ms-hub-section-body::-webkit-scrollbar-thumb { background-color: var(--accent); }





.ms-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background-color: var(--surface);
  color: var(--fg);
  cursor: pointer;
  transition: filter 120ms;
}

.ms-tile:hover { filter: brightness(1.15); }
.ms-tile:active { filter: brightness(0.9); }


.ms-tile-sq   { width: var(--tile-sq);   height: var(--tile-sq); }
.ms-tile-wide { width: var(--tile-wide); height: var(--tile-sq); }
.ms-tile-tall { width: var(--tile-sq);   height: var(--tile-tall); }
.ms-tile-big  { width: var(--tile-wide); height: var(--tile-tall); }


.ms-tile-lime   { background-color: var(--accent); color: #000; }
.ms-tile-blue   { background-color: #0078D4; }
.ms-tile-red    { background-color: #E51400; }
.ms-tile-dark   { background-color: var(--surface); border: 1px solid var(--divider); }
.ms-tile-purple { background-color: #682C86; }


.ms-tile-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ms-tile-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

.ms-tile-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.ms-tile-sub {
  font-size: 11px;
  opacity: 0.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-tile-meta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}



.ms-tile-grid {
  display: grid;
  grid-template-rows: var(--tile-sq) var(--tile-sq);
  grid-auto-flow: column dense;
  grid-auto-columns: var(--tile-sq);
  gap: var(--tile-gap);
  height: calc(var(--tile-sq) * 2 + var(--tile-gap));
}

.ms-tile-sq {
  grid-column: span 1;
  grid-row: span 1;
}

.ms-tile-wide {
  grid-column: span 2;
  grid-row: span 1;
}

.ms-tile-tall {
  grid-column: span 1;
  grid-row: span 2;
}

.ms-tile-big {
  grid-column: span 2;
  grid-row: span 2;
}


/* Windows Start — сетка ленты */
.ms-hub-section--start {
  width: calc(6 * var(--tile-sq) + 5 * var(--tile-gap));
}

.ms-hub-section--start .ms-hub-section-body {
  overflow: visible;
}

.ms-tile-grid--start {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--tile-sq);
  grid-template-rows: repeat(4, var(--tile-sq));
  gap: var(--tile-gap);
  width: max-content;
  height: 100%;
}

.ms-tile-1x1 { grid-column: span 1; grid-row: span 1; }
.ms-tile-2x2 { grid-column: span 2; grid-row: span 2; }
.ms-tile-4x2 { grid-column: span 4; grid-row: span 2; }
.ms-tile-4x4 { grid-column: span 4; grid-row: span 4; }

.ms-tile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.ms-tile-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.ms-tile-badge .material-symbols-outlined,
.ms-tile-sub .material-symbols-outlined {
  font-size: 13px;
  vertical-align: -2px;
}

/* 1x1 плитки: иконка по центру, без шума и съехавших иконок */
.ms-tile-1x1 .ms-tile-label,
.ms-tile-1x1 .ms-tile-sub,
.ms-tile-1x1 .ms-tile-badge,
.ms-tile-1x1 .ms-tile-row {
  display: none;
}

.ms-tile-1x1 .ms-tile-body {
  height: 100%;
  padding: 8px;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.ms-tile-1x1 .ms-tile-ic {
  display: block;
  font-size: 30px;
  line-height: 1;
  opacity: 0.9;
}

.ms-tile-1x1 .ms-tile-title {
  font-size: 12px;
  -webkit-line-clamp: 3;
}

.ms-pub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, var(--tile-wide));
  gap: var(--tile-gap);
}



.ms-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: var(--surface);
  padding: 18px;
  border: 1px solid var(--divider);
}

.ms-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  display: block;
  margin-bottom: 4px;
}

.ms-input,
.ms-select,
.ms-textarea {
  background-color: var(--bg);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--fg);
  font-family: var(--font);
  font-size: 14px;
  padding: 8px 12px;
  outline: none;
  width: 100%;
  display: block;
  transition: border-color 120ms;
}

.ms-input:focus,
.ms-select:focus,
.ms-textarea:focus {
  border-color: var(--accent);
}

.ms-textarea { resize: none; }


.ms-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  background-color: var(--accent);
  color: #000;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: none;
  cursor: pointer;
  transition: filter 120ms;
}

.ms-btn:hover { filter: brightness(1.1); }
.ms-btn:active { filter: brightness(0.85); }

.ms-btn-outline {
  background-color: transparent;
  color: var(--fg);
  border: 1px solid rgba(255,255,255,0.4);
}

.ms-btn-outline:hover {
  background-color: rgba(255,255,255,0.1);
  filter: none;
}


.ms-appbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--appbar-height);
  background-color: var(--chrome);
  border-top: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  z-index: 900;
}

.ms-appbar-commands {
  display: flex;
  align-items: center;
  gap: 20px;
}


.ms-appbar-cmd {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--fg);
  text-decoration: none;
  padding: 4px 8px;
  transition: color 120ms;
}

.ms-appbar-cmd:hover { color: var(--accent); }

.ms-appbar-cmd-ring {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 50% !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: border-color 120ms, background-color 120ms;
}

.ms-appbar-cmd:hover .ms-appbar-cmd-ring {
  border-color: var(--accent);
  background-color: var(--accent);
  color: #000;
}

.ms-appbar-cmd-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}


.ms-user-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--divider);
  text-decoration: none;
  color: var(--fg);
  transition: color 100ms;
}

.ms-user-item:hover { color: var(--accent); }

.ms-user-avatar {
  width: 38px;
  height: 38px;
  border: 1px solid var(--divider);
  overflow: hidden;
  flex-shrink: 0;
}

.ms-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ms-user-name {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-user-status {
  font-size: 11px;
  color: var(--fg-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


.ms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.ms-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  border-bottom: 1px solid var(--divider);
  padding: 6px 8px;
}

.ms-table td {
  padding: 8px;
  border-bottom: 1px solid var(--divider);
  vertical-align: middle;
  color: var(--fg);
}

.ms-table tr:hover td { background-color: var(--surface); }


.ms-toast-container {
  position: fixed;
  top: calc(var(--nav-height) + 12px);
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ms-toast {
  background-color: var(--surface);
  border-left: 4px solid var(--accent);
  padding: 12px 16px;
  max-width: 320px;
  font-size: 13px;
  color: var(--fg);
  animation: toast-slide-in 200ms ease-out;
}

.ms-toast.error { border-left-color: #E51400; }
.ms-toast.info  { border-left-color: #0078D4; }

@keyframes toast-slide-in {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}


.ms-like-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--fg-dim);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  transition: color 100ms;
}

.ms-like-btn:hover { color: var(--accent); }
.ms-like-btn.liked { color: var(--accent); }


.ms-dialog-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.85);
  z-index: 990;
  display: none;
  align-items: center;
  justify-content: center;
}

.ms-dialog-overlay.open { display: flex; }

.ms-dialog {
  background-color: var(--surface);
  border: 1px solid rgba(255,255,255,0.15);
  max-width: 520px;
  width: 90%;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ms-dialog-title {
  font-size: 22px;
  font-weight: 100;
  color: var(--fg);
}

.ms-dialog-body {
  font-size: 14px;
  color: var(--fg-dim);
  line-height: 1.5;
}

.ms-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}


.ms-flash { padding: 10px 16px; font-size: 13px; margin-bottom: 8px; }
.ms-flash.success { background-color: var(--accent); color: #000; }
.ms-flash.error   { background-color: #E51400; color: #fff; }
.ms-flash.info    { background-color: #0078D4; color: #fff; }


.ms-hub-section-body::-webkit-scrollbar { display: none; }
.ms-hub-section-body { scrollbar-width: none; }





.ms-viewport {
  will-change: transform, opacity;
}



.ms-tile:hover {
  filter: brightness(1.12);
  cursor: pointer;
}


.ms-tile:active {
  filter: brightness(0.78);
  transition: filter 60ms linear !important;
}


a.ms-tile { display: flex; }


.ms-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: filter 80ms linear;
  outline: none;
  position: relative;
}

.ms-btn:hover {
  filter: brightness(1.12);
}

.ms-btn:active {
  filter: brightness(0.80);
  transition: filter 40ms linear;
}

.ms-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.ms-btn:disabled,
.ms-btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.ms-btn-outline:hover {
  background-color: rgba(255,255,255,0.10);
  filter: none;
}

.ms-btn-outline:active {
  background-color: rgba(255,255,255,0.20);
  filter: none;
}


.ms-input,
.ms-select,
.ms-textarea {
  transition: border-color 100ms linear;
}

.ms-input:hover,
.ms-select:hover,
.ms-textarea:hover {
  border-color: rgba(255,255,255,0.45);
}

.ms-input:focus,
.ms-select:focus,
.ms-textarea:focus {
  border-color: var(--accent);
  
}

.ms-input:disabled,
.ms-select:disabled,
.ms-textarea:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}


.ms-nav-item {
  transition: color 120ms linear, border-bottom-color 120ms linear;
  position: relative;
}


.ms-nav-item.active {
  color: var(--fg);
  border-bottom: none;  
}

.ms-nav-item:hover {
  color: var(--fg);
}


.ms-appbar-cmd {
  transition: color 100ms linear;
  cursor: pointer;
}

.ms-appbar-cmd-ring {
  transition: background-color 80ms linear, border-color 80ms linear, color 80ms linear;
}

.ms-appbar-cmd:hover .ms-appbar-cmd-ring {
  border-color: var(--accent);
  background-color: rgba(164,196,0,0.15);
}

.ms-appbar-cmd:active .ms-appbar-cmd-ring {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #000;
}


.ms-appbar-cmd.active .ms-appbar-cmd-ring {
  border-color: var(--accent);
  color: var(--accent);
}


.ms-user-item {
  transition: color 100ms linear, background-color 100ms linear;
}

.ms-user-item:hover {
  background-color: var(--surface);
  color: var(--accent);
}

.ms-user-item:active {
  background-color: rgba(164,196,0,0.12);
}


.ms-hub {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.ms-hub::-webkit-scrollbar { display: none; }


.ms-chat-msg {
  background-color: var(--surface);
  border: 1px solid var(--divider);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ms-chat-msg-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.ms-chat-msg-author {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.ms-chat-msg-time {
  font-size: 10px;
  color: var(--fg-dim);
  font-variant-numeric: tabular-nums;
}

.ms-chat-msg-body {
  font-size: 13px;
  color: var(--fg);
  line-height: 1.4;
}


.ms-chat-msg.own {
  border-left: 3px solid var(--accent);
}

.ms-chat-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background-color: var(--surface);
  border: 1px solid var(--divider);
  padding: 12px;
}

.ms-chat-messages-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.ms-chat-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-shrink: 0;
}



.ms-like-btn:hover { color: var(--accent); }
.ms-like-btn:active { color: var(--fg-dim); }
.ms-like-btn.liked { color: var(--accent); }


.ms-table tbody tr {
  transition: background-color 80ms linear;
}

.ms-table tbody tr:hover td {
  background-color: var(--surface);
}


.ms-dialog-overlay {
  transition: opacity 150ms linear;
}


.ms-form button[type=submit]:active {
  filter: brightness(0.80);
}


:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 1px;
}


:focus:not(:focus-visible) {
  outline: none;
}


.ms-navbar,
.ms-nav-item,
.ms-appbar,
.ms-appbar-cmd,
.ms-tile-label,
.ms-btn,
.ms-page-title,
.ms-hub-section-header,
.ms-user-item,
.ms-table th,
.ms-toast,
.ms-dialog-title,
.material-symbols-outlined,
#ms-pivot-indicator {
  user-select: none;
  -webkit-user-select: none;
}

p,
span,
textarea,
input,
code,
pre,
.ms-chat-msg-body,
.ms-tile-title,
.ms-tile-sub,
.ms-dialog-body,
.ms-chat-msg,
.ms-table td {
  user-select: text;
  -webkit-user-select: text;
}



@media screen and (max-width: 768px) {
  :root {
    --hub-margin-left: 14px;
    --hub-section-gap: 20px;
    --nav-height: 48px;
    --appbar-height: 0px;
  }

  
  .ms-navbar {
    padding: 0 8px;
    height: 48px;
    gap: 4px;
  }

  .ms-navbar-brand {
    margin-right: 6px;
    gap: 4px;
  }

  .ms-navbar-logo {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }

  .ms-navbar-appname {
    display: none !important; 
  }

  .ms-nav-items {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .ms-nav-items::-webkit-scrollbar {
    display: none;
  }

  .ms-nav-item {
    padding: 0 6px;
    font-size: 10px;
    white-space: nowrap;
  }

  .ms-navbar-right {
    gap: 4px;
    flex-shrink: 0;
    margin-left: 4px;
  }

  .ms-navbar-username {
    display: none !important;
  }

  .ms-navbar-right .ms-btn {
    padding: 4px 8px;
    font-size: 9px;
    min-height: 28px;
  }


  
  .ms-page-title {
    padding: 10px 0 0 14px;
  }

  .ms-page-title h1 {
    font-size: 26px;
  }

  
  .ms-hub {
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    padding-left: 14px;
    padding-right: 14px;
    padding-top: 10px;
    gap: 20px;
    height: 100%;
  }

  .ms-hub-section {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    flex-shrink: 0;
  }

  .ms-hub-section-body {
    overflow: visible !important;
    max-height: none !important;
  }

  .ms-hub-section-header {
    font-size: 22px;
    margin-bottom: 10px;
  }

  
  .ms-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    grid-auto-flow: row;
    height: auto;
    gap: 8px;
  }

  .ms-tile-sq,
  .ms-tile-wide,
  .ms-tile-tall,
  .ms-tile-big {
    width: 100% !important;
    height: auto !important;
    min-height: 110px;
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }

  .ms-tile-big {
    min-height: 180px;
  }

  .ms-tile-grid--start {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto;
    grid-auto-flow: row;
    grid-template-rows: none;
    width: 100%;
    height: auto;
  }

  .ms-tile-1x1,
  .ms-tile-2x2,
  .ms-tile-4x2,
  .ms-tile-4x4 {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 130px;
  }

  .ms-tile-4x2 {
    min-height: 160px;
  }

  .ms-tile-4x4 {
    grid-row: span 2 !important;
    min-height: 280px;
  }

  .ms-tile-body {
    padding: 10px;
  }

  
  .ms-input,
  .ms-select,
  .ms-textarea {
    font-size: 16px !important;
    padding: 10px 12px;
  }

  .ms-form {
    padding: 14px;
  }

  .ms-btn {
    min-height: 40px;
    padding: 8px 16px;
  }

  
  .ms-appbar {
    padding: 0 10px;
    height: 54px;
  }

  .ms-appbar-commands {
    gap: 8px;
  }

  .ms-appbar-cmd {
    padding: 2px 4px;
  }

  .ms-appbar-cmd-ring {
    width: 32px;
    height: 32px;
    font-size: 15px;
  }

  .ms-appbar-cmd-label {
    font-size: 8px;
  }

  
  .ms-dialog {
    width: 95%;
    padding: 18px;
  }

  .ms-mobile-hide {
    display: none !important;
  }

  .ms-mobile-only {
    display: inline-flex !important;
  }
}

.ms-mobile-only {
  display: none;
}



@media screen and (max-width: 380px) {
  .ms-navbar-brand .ms-navbar-appname {
    display: none;
  }

  .ms-appbar-cmd-label {
    display: none;
  }

  .ms-tile-grid {
    grid-template-columns: 1fr;
  }
}


@media screen and (max-height: 500px) and (orientation: landscape) {
  :root {
    --nav-height: 40px;
    --appbar-height: 0px;
  }

  .ms-navbar {
    height: 40px;
    padding: 0 12px;
  }

  .ms-nav-item {
    font-size: 9px;
  }

  .ms-page-title {
    padding-top: 6px;
  }

  .ms-page-title h1 {
    font-size: 22px;
  }

  .ms-appbar {
    height: 44px;
  }

  .ms-appbar-cmd-ring {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }

  .ms-appbar-cmd-label {
    display: none;
  }
}


@supports (padding: env(safe-area-inset-bottom)) {
  .ms-appbar {
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(var(--appbar-height) + env(safe-area-inset-bottom));
  }
}


.ms-profile-bg-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
  filter: brightness(0.75) contrast(1.1);
}




