/* Modern minimal / Apple-like styles */
:root{
	--bg: #f5f5f7;
	--surface: #ffffff;
	--muted: #6b6b6b;
	--text: #111111;
	--accent: #0071e3;
}
html,body{height:100%;}
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: 76px;
}

.dettaglio-libro {
  width: 50vw;
}

.main-content { /* makes main area grow so footer stays at bottom */
  flex: 1 0 auto;
  margin-top: 50px;
}

.footer-sticky { /* optional styling to ensure footer visible */
  flex-shrink: 0;
}

/* Navbar */
.navbar {
	background: var(--surface) !important;
	border-bottom: 1px solid rgba(0,0,0,0.06);
	box-shadow: none;
}
.navbar .navbar-brand{font-weight:600; color:var(--text);}
.navbar .nav-link{color:var(--muted);}
.navbar .nav-link:hover{color:var(--text);}
.navbar .user-info{padding-right:0.5rem;}

/* Cards and UI */
.card{border:none; border-radius:12px; box-shadow:0 6px 18px rgba(0,0,0,0.06);}

/* Book cards */
.book-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}
.book-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.09);
}
.book-cover-wrapper {
  height: 260px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
.book-img {
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.no-cover {
  width: 160px;
  height: 220px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Book detail page */
.book-detail-cover {
  max-height: 400px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.book-detail-info {
  padding: 2rem;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  margin-top: 10px;
}
.book-description {
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.95rem;
  color: var(--muted);
}
.card-title {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.3;
}

/* Chart constraints */
.chart-max {
  max-height: 300px;
  height: 300px;
  position: relative;
}

/* Forms */
input.form-control, select.form-select, textarea.form-control{
	border-radius:10px; border:1px solid #e6e6e6; padding:.7rem; box-shadow:none;
}

.btn-primary{
	background: var(--accent); border: none; color: #fff; border-radius:10px; padding:.45rem .9rem; box-shadow:none;
}

.btn-success{background:#28a745;border:none;border-radius:10px;padding:.45rem .9rem}

.alert{border-radius:10px}

/* Centered login card */
.login-wrapper{
  min-height:60vh; 
  display:flex; 
  align-items:center;
  justify-content:center; 
  flex-direction: column !important;
}

/* Small helper tweaks */
.text-muted{color:#8c8c8c!important}

/* Small role badge next to username */
.role-badge{
  font-size:0.75rem;
  text-transform:none;
  padding:.35em .5em;
  border-radius:.5rem;
}

/* Keep add-book button style compact inside navbar */
.navbar .btn-success{
  box-shadow:none;
  border-radius:8px;
  font-weight:600;
}

/* logout minimal icon/button */
.logout-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
  padding:.25rem .5rem;
}
.logout-btn svg{display:block}
.logout-btn:hover{color:var(--text); background: rgba(0,0,0,0.03); border-radius:6px}
.logo-login{
  max-width:200px;
  margin-bottom:1rem;
}