* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  background: #f3f4f6;
  color: #222;
}

body {
  display: flex;
  flex-direction: column;
}


/* ---------- TOP BAR ---------- */

.topbar {
  height: 60px;
  background: #ffffff;
  border-bottom: 1px solid #ddd;

  display: flex;
  align-items: center;

  padding: 0 16px;
  gap: 16px;

  flex-shrink: 0;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  flex: 1;
}

.primary-btn {
  border: none;
  background: #2563eb;
  color: white;

  padding: 10px 18px;

  border-radius: 8px;

  font-size: 15px;
  font-weight: 600;

  cursor: pointer;
}

.primary-btn:hover {
  background: #1d4ed8;
}

.primary-btn.large {
  padding: 13px 24px;
  font-size: 16px;
}


/* ---------- MAIN ---------- */

.app {
  flex: 1;
  min-height: 0;
}


/* ---------- WELCOME ---------- */

.welcome {
  width: 100%;
  height: 100%;

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 30px;
}

.welcome-box {
  background: white;

  width: min(500px, 100%);

  padding: 50px 30px;

  border-radius: 16px;

  text-align: center;

  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.pdf-icon {
  width: 70px;
  height: 80px;

  margin: 0 auto 20px;

  background: #ef4444;
  color: white;

  border-radius: 8px;

  display: flex;
  justify-content: center;
  align-items: center;

  font-weight: bold;
  font-size: 20px;
}

.welcome-box h1 {
  margin: 10px 0;
  font-size: 28px;
}

.welcome-box p {
  color: #666;
  margin-bottom: 28px;
}


/* ---------- EDITOR ---------- */

.editor {
  height: 100%;

  display: flex;
  flex-direction: column;
}

.hidden {
  display: none !important;
}


/* ---------- TOOLBAR ---------- */

.toolbar {
  min-height: 52px;

  background: white;

  border-bottom: 1px solid #ddd;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 8px;

  padding: 6px 10px;

  flex-shrink: 0;
}

.tool-btn {
  min-width: 42px;
  height: 40px;

  border: 1px solid #ddd;

  background: white;

  border-radius: 7px;

  cursor: pointer;

  font-size: 15px;
}

.tool-btn:hover {
  background: #f1f5f9;
}

#pageInfo,
#zoomInfo {
  min-width: 70px;
  text-align: center;
  font-size: 14px;
}

.separator {
  width: 1px;
  height: 26px;
  background: #ddd;

  margin: 0 8px;
}


/* ---------- PDF AREA ---------- */

.pdf-area {
  flex: 1;

  overflow: auto;

  background: #525659;

  padding: 30px;

  display: flex;
  justify-content: center;

  -webkit-overflow-scrolling: touch;
}

.pdf-container {
  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 20px;
}

.pdf-page-wrapper {
  position: relative;
  background: white;
  box-shadow: 0 3px 12px rgba(0,0,0,0.35);
  flex-shrink: 0;
}

.pdf-page {
  background: white;
  display: block;
}

.today-stamp {
  position: absolute;
  z-index: 10;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #2563eb;
  border-radius: 5px;
  color: #111827;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 600;
  cursor: move;
  user-select: none;
  touch-action: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}


/* ---------- FOOTER ---------- */

.footer {
  height: 32px;

  background: #fff;

  border-top: 1px solid #ddd;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 12px;
  color: #777;

  flex-shrink: 0;
}


/* ---------- MOBILE ---------- */

@media (max-width: 600px) {

  .topbar {
    height: 56px;
    padding: 0 10px;
  }

  .logo {
    font-size: 17px;
  }

  .primary-btn {
    padding: 9px 13px;
    font-size: 14px;
  }

  .welcome {
    padding: 15px;
  }

  .welcome-box {
    padding: 35px 20px;
  }

  .welcome-box h1 {
    font-size: 24px;
  }

  .toolbar {
    gap: 4px;
    padding: 5px;
  }

  .tool-btn {
    min-width: 40px;
  }

  #pageInfo,
  #zoomInfo {
    min-width: 55px;
    font-size: 13px;
  }

  .separator {
    margin: 0 3px;
  }

  .pdf-area {
    padding: 15px;
  }

  .footer {
    display: none;
  }

  .today-stamp {
    font-size: 16px;
    padding: 5px 8px;
  }
}
