@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #0f172a;
  --accent: #f97316;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --success: #22c55e;
  --danger: #ef4444;
  --radius: 14px;
  --shadow: 0 15px 35px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

header {
  background: var(--card);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 99;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  gap: 24px;
}

.login-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.logo-with-mark {
  color: var(--secondary);
  font-size: 0.9rem;
  line-height: 1.1;
}

.logo-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1.5px solid rgba(37, 99, 235, 0.35);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.logo-title {
  font-size: 0.9rem;
  color: var(--secondary);
}

.logo-subtitle {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
}

.search-bar {
  flex: 1;
  background: var(--bg);
  border-radius: 999px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-bar input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 0.95rem;
  outline: none;
}

.btn {
  padding: 12px 24px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: var(--primary-dark);
}

.btn-outline {
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: transparent;
  color: var(--text);
}

.hero {
  padding: 80px 0 60px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  align-items: center;
  position: relative;
}

.hero-with-bg {
  background: 
    linear-gradient(135deg, rgba(37, 99, 235, 0.85) 0%, rgba(15, 23, 42, 0.75) 100%),
    url('https://images.unsplash.com/photo-1523050854058-8df90110c9f1?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
  border-radius: 24px;
  padding: 60px 40px;
  margin: 20px 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.hero-with-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(249, 115, 22, 0.2) 0%, transparent 50%);
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
  color: inherit;
}

.hero-with-bg h1 {
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
  color: var(--muted);
  margin-bottom: 24px;
}

.hero-with-bg p {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
  font-size: 1.1rem;
}

.hero-img {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(249, 115, 22, 0.15));
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}

.hero-with-bg .hero-img {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.hero-with-bg .btn-primary {
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-with-bg .btn-primary:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.hero-with-bg .btn-outline {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-with-bg .btn-outline:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.section {
  padding: 40px 0 20px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 1.4rem;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.notice-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(15, 23, 42, 0.04));
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.notice-title {
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 4px;
}

.notice-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 220px;
}

.login-reminder .btn {
  width: 100%;
}

.number-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 16px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.book-cover {
  border-radius: 16px;
  height: 220px;
  margin-bottom: 16px;
  object-fit: cover;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
}

.chip-success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.chip-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.chip-info {
  background: rgba(37, 99, 235, 0.15);
  color: var(--primary);
}

.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-card {
  flex: 1 1 220px;
  padding: 20px;
}

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  padding: 32px 0;
}

.sidebar {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.sidebar h3 {
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu a {
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 500;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.menu a.active,
.menu a:hover {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

.content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.table th {
  color: var(--muted);
  font-size: 0.9rem;
}

.table tr:hover td {
  background: rgba(15, 23, 42, 0.02);
}

.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filters input,
.filters select {
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  font-size: 0.95rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

label {
  font-weight: 500;
  font-size: 0.9rem;
}

input,
select,
textarea {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 1rem;
}

.form-card {
  max-width: 420px;
  margin: 60px auto;
  padding: 32px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-helper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.muted-link {
  color: var(--primary);
  font-weight: 600;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.auth-divider span {
  flex: 1;
  height: 1px;
  background: rgba(15, 23, 42, 0.1);
}

.btn-google {
  border: 1px solid rgba(15, 23, 42, 0.2);
  background: #fff;
  color: var(--secondary);
  justify-content: center;
}

.btn-google svg {
  margin-right: 8px;
}

.btn-google:hover {
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.form-switch {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
}

.form-switch a {
  color: var(--primary);
  font-weight: 600;
}

.book-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.loan-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.loan-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.loan-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.status-card {
  padding: 20px;
}

.status-card h3 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.history {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  padding: 16px;
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer {
  margin-top: auto;
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .nav {
    flex-wrap: wrap;
  }

  .login-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .notice-card {
    flex-direction: column;
  }

  .notice-actions {
    width: 100%;
    min-width: unset;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .loan-item {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
}

