/*---------------------------------------------------------------------------*/
/* Reset & Base                                                              */
/*---------------------------------------------------------------------------*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background: #fafafa;
  color: #333;
}
a {
  color: #0066cc;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/*---------------------------------------------------------------------------*/
/* Layout                                                                    */
/*---------------------------------------------------------------------------*/
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/*---------------------------------------------------------------------------*/
/* Header & Navigation                                                       */
/*---------------------------------------------------------------------------*/
.header {
  background: #f8f8f8;
  border-bottom: 1px solid #ddd;
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75em 1em;
  position: relative;
}
.logo a {
  font-size: 1.25rem;
  font-weight: bold;
  color: #333;
}

/* 桌機版 nav-links */
.nav-links {
  display: flex;
  gap: 1rem;
}
.nav-links a {
  padding: 0.5em;
}

/* 漢堡按鈕 (預設隱藏) */
.hamburger {
  display: none;
  width: 2rem;
  height: 2rem;
  flex-direction: column;
  justify-content: space-around;
  cursor: pointer;
  z-index: 1000;
}
.hamburger span {
  display: block;
  height: 3px;
  background: #333;
  border-radius: 2px;
}

/*---------------------------------------------------------------------------*/
/* Tables                                                                    */
/*---------------------------------------------------------------------------*/
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}
th, td {
  border: 1px solid #ccc;
  padding: 0.5em;
  vertical-align: top;
}
th {
  background: #f5f5f5;
  text-align: left;
}

/*---------------------------------------------------------------------------*/
/* Forms & Inputs                                                            */
/*---------------------------------------------------------------------------*/
form label {
  display: block;
  margin: 0.5em 0;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="datetime-local"],
input[type="number"],
select,
textarea,
input[type="file"] {
  width: 100%;
  padding: 0.5em;
  border: 1px solid #ccc;
  border-radius: 3px;
  margin-top: 0.25em;
}

/*---------------------------------------------------------------------------*/
/* Buttons                                                                   */
/*---------------------------------------------------------------------------*/
button,
.btn {
  background: #0066cc;
  color: #fff;
  border: none;
  padding: 0.5em 1em;
  border-radius: 3px;
  cursor: pointer;
  font-size: 1rem;
}
button:hover,
.btn:hover {
  background: #005bb5;
}

/*---------------------------------------------------------------------------*/
/* Utility                                                                   */
/*---------------------------------------------------------------------------*/
.dynamic-bg {
  background: linear-gradient(135deg, #e0f7fa, #80deea);
  padding: 1em;
  border-radius: 5px;
  margin: 1em 0;
}

/*---------------------------------------------------------------------------*/
/* Print Styles                                                              */
/*---------------------------------------------------------------------------*/
@media print {
  .no-print {
    display: none !important;
  }
  body {
    margin: 1cm;
    font-size: 12pt;
  }
}

/*---------------------------------------------------------------------------*/
/* Mobile Navigation (只用 transform + .open)                                */
/*---------------------------------------------------------------------------*/
@media (max-width: 768px) {
  /* 顯示漢堡，隱藏原本桌機 nav-links */
  .hamburger {
    display: flex;
  }
  .nav-links {
    position: fixed;
    top: 0; right: 0;
    width: 70%; max-width: 240px;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 8px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    flex-direction: column;
    padding: 2rem 1rem;
    gap: 1rem;
    z-index: 999;
  }
  .nav-links.open {
    transform: translateX(0);
  }
  /* 表格橫向捲動 */
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/*---------------------------------------------------------------------------*/
/* 更小裝置再微調                                                            */
/*---------------------------------------------------------------------------*/
@media (max-width: 480px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .hamburger {
    align-self: flex-end;
  }
}
