:root {
  --bg: #f5f5f5;
  --text: #3c3c3c;     
  --muted: #6b6b6b;
  --supermuted: #d6d6d6;
  --theme: #158349;
  --mutedtheme: rgba(21, 131, 73, 0.1);
  --white: #ffffff;
  --black: #000000;
  --radius: 12px;
  font-size: 14px;
}

html,
body {
  margin: 0 10px;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  font-family: "Aptos Narrow", "Segoe UI", Calibri, Thonburi, Arial;
  color: var(--text);
  background: var(--bg);
}

.topbar {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.topbar-icon {
  height: 2rem;
  width: 2rem;
}

.header-icon .topbar-icon {
  height: 2.5rem;
  width: 2.5rem;
}

.save-btn {
  display: flex;
  align-items: center;
}

.document-title {
  display: flex;
  align-items: center;
}

.header,
.ribbon,
.ribbon-options,
.formula-bar {
  width: 100%;
}

.header {
  height: 3.5rem;
  display: flex;
  background-color: var(--bg);
  align-items: center;    
}

.header-left {
  display: flex;
  gap: 1.5rem;
  margin-right: auto;
}

.header-right {
  display: flex;
  gap: 1.5rem;
}

.avatar {
  display: flex;
  justify-content: center; 
  align-items: center;    
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--text);
  border-radius: 50%;
  background-color: var(--bg);
  box-sizing: border-box; 
}

.ribbon {
  display: flex;
  height: 2rem;
  gap: 1.5rem;
  background-color: var(--bg);
}

#ribbon-home {
  font-weight: 700;
  border-bottom: 2px solid var(--theme);
}

.ribbon-options {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  border-radius: var(--radius);
  background-color: var(--white);
  border: 1px solid var(--white);
  height: 2rem;

  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  padding: 0 0.75rem;
  -webkit-overflow-scrolling: touch;
}

#restart-button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.formula-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background-color: var(--bg);
  height: 2rem;
}

#formula-bar-input {
  flex: 1;
}

#formula-bar-input input{
  width: 100%; 
}

.grid {
  overflow-x: auto;
  overflow-y: auto;
  margin: 0 -20px;
}

.row {
  display: flex;
}

.row .row1,
.row > div:first-child {
  background-color: var(--bg);
}

.row .row1 {
  display: flex;
  align-items: center;
  justify-content: center;
}

.row > div:first-child {
  display: flex;
  align-items: center;
  justify-content: right;
}

.row > div:not(:first-child) {
  width: 7rem;
}

.row > div {
  border: 1px solid var(--supermuted);
  background-color: var(--white);
  min-height: 1.5rem;
  height: auto;
  width: 3rem;
  flex-shrink: 0;
}

.row > div:focus {
  outline: 2px solid var(--theme);
  outline-offset: -2px;
}

.selected-primary {
  outline: 2px solid var(--theme);
  outline-offset: -2px;
}

.selected {
  background-color: var(--mutedtheme) !important;
  outline: 1px solid var(--theme);
  outline-offset: -1px;
}

.sheets {
  display: flex;
  align-items: center;
  height: 2rem;
  background-color: var(--bg);
  gap: 1.5rem;
  margin-top: auto;
  border-bottom: 1px solid var(--supermuted);
}

#sheet1 {
  font-weight: 700;
  border-bottom: 2px solid var(--theme);
}

.footer {
  display: flex;
  align-items: center;
  height: 1.5rem;
  font-size: 0.8rem;
  background-color: var(--bg);
  color: var(--text);
}

.footer-right {
  margin-left: auto;
}


