/* =========================
   RESET
========================= */
@import url("/static/css/naplo_sidebar.css");
@import url("/static/css/tables_actions.css");
@import url("/static/css/year_admin_filters.css");
@import url("/static/css/alerts_feedback.css");
@import url("/static/css/naplo_layout.css");
@import url("/static/css/map_page.css");
@import url("/static/css/app_mobile.css");

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #1a1a1a;
  line-height: 1.4;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* =========================
   SHARED
========================= */

:root {
  --green: #2e7d32;
  --green-dark: #1b5e20;
  --red: #b3261e;
  --red-dark: #8f1d17;
  --gray-50: #f8f9fa;
  --gray-100: #f4f6f4;
  --gray-200: #e6e6e6;
  --gray-300: #cfcfcf;
  --gray-500: #666;
  --gray-700: #333;
  --white: rgba(255, 255, 255, 0.97);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.2);
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--green);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s ease;
}

.btn:hover {
  background: var(--green-dark);
}

.btn.secondary {
  background: #555;
}

.btn.secondary:hover {
  background: #333;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.auth-btn.login {
  background: var(--green);
  color: #fff;
}

.auth-btn.login:hover {
  background: var(--green-dark);
}

.auth-btn.logout {
  background: var(--red);
  color: #fff;
}

.auth-btn.logout:hover {
  background: var(--red-dark);
}

/* =========================
   LANDING
========================= */

.landing-body {
  min-height: 100vh;
  background: url("/static/agrobi_hatter.png") no-repeat center center fixed;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-center{
  width:100%;
  max-width:1100px;
  margin:120px auto 0 auto;
}

.logo-row{
  display:flex;
  justify-content:center;
}

.landing-logo{
  width:min(900px,90vw);
}

.landing-text{
  display:grid;
  grid-template-columns:140px 1fr;
  margin-top:10px;
}

.landing-slogan{
  grid-column:2;
  font-size:36px;
  font-weight:700;
  color:black;
  margin:0;
}

.landing-description{
  grid-column:2;
  margin-top:6px;
  font-size:18px;
  color:black;
  font-style:italic;
}

.landing-contact{
  margin-top:-10px;
  padding-left:140px;
  display:flex;
  flex-direction:column;
  gap:8px;
  font-size:16px;
}

.contact-item{
  display:flex;
  align-items:center;
  gap:10px;
  color:black;
  text-decoration:none;
}

.contact-item svg{
  flex-shrink:0;
}

.contact-item:hover{
  text-decoration:underline;
}

.landing-menu {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 2000;
}

.landing-menu-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.landing-dropdown {
  display: none;
  margin-top: 10px;
  min-width: 300px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.landing-dropdown.open {
  display: block;
}

.landing-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: #1a1a1a;
  text-decoration: none;
  font-size: 14px;
}

.landing-link:hover {
  background: var(--gray-100);
}

.landing-link-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.landing-auth {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
}

/* =========================
   LOGIN
========================= */

.login-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url("/static/agrobi_hatter.png") no-repeat center center fixed;
  background-size: cover;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 30px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.login-logo {
  width: 160px;
  margin: 0 auto 20px;
}

.login-card h2 {
  margin: 0 0 24px;
  font-size: 24px;
  text-align: center;
}

.login-error {
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(179, 38, 30, 0.08);
  color: #8b1f19;
  font-size: 14px;
  text-align: left;
}

.login-form {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.login-field {
  width: 100%;
  margin-bottom: 14px;
}

.login-field input {
  display: block;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: #fff;
  color: #1a1a1a;
}

.login-field input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.2);
}


.password-field input {
  padding-right: 48px;
}

.password-toggle:hover {
  opacity: 0.8;
}

.login-btn {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 4px;

  background: var(--green);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.login-btn:active {
  transform: translateY(1px);
}

.login-btn:hover {
  background: #1b5e20;
}

/* =========================
   APP LAYOUT
========================= */

.app-body {
  min-height: 100vh;
  background: url("/static/agrobi_hatter.png") no-repeat center center fixed;
  background-size: cover;
}

.app-layout {
  min-height: 100vh;
  display: flex;
}

.app-sidebar {
  width: 240px;
  flex: 0 0 240px;
  background: rgba(27, 94, 32, 0.95);
  color: #fff;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.app-sidebar-logo img {
  width: 160px;
}

.app-sidebar-link {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  text-decoration: none;
}

.app-sidebar-link:hover {
  background: rgba(255, 255, 255, 0.25);
}

.app-main {
  flex: 1;
  min-width: 0;
  padding: 40px 50px;
}

.app-content {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.top-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.top-bar-user {
  font-size: 14px;
  color: #333;
}

/* =========================
   APP HEADER
========================= */

.app-header {
display:flex;
align-items:center;
justify-content:space-between;
gap:20px;
flex-wrap:wrap;
}

.app-header-logo {
  width: 100px;
  flex: 0 0 auto;
}

.app-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

/* =========================
   FORM
========================= */

.form {
  display: grid;
  gap: 18px;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.form-row {
  width: 100%;
}

.form-row label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  background: #fff;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.15);
}

/* TomSelect kompatibilitás */
.ts-wrapper {
  width: 100%;
}

.ts-control {
  min-height: 42px;
  border-radius: var(--radius-md) !important;
  border-color: var(--gray-300) !important;
  padding: 8px 10px !important;
  box-shadow: none !important;
}

.ts-control.focus {
  border-color: var(--green) !important;
  box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.15) !important;
}

.ts-dropdown {
  border-radius: var(--radius-md);
  border-color: var(--gray-300);
}

/* =========================
   RESULT PAGE
========================= */

.result-card {
  display: flex;
  flex-direction: column;
  gap: 25px;
  padding: 30px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.alert {
  font-size: 15px;
}

.alert.success {
  color: #155724;
}

.alert.error {
  color: #b00020;
}

.result-actions {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* =========================
   CLIENT SELECTOR
========================= */

.client-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #fff;
}

.client-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.client-item:hover {
  background: var(--gray-100);
}

.client-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
  cursor: pointer;
}

/* =========================
   LEGELTETÉS GRID
========================= */

.legeltetes-grid {
  display: grid;
  grid-template-columns: 1fr 120px 40px;
  gap: 10px;
  align-items: center;
}

.legeltetes-label {
  padding: 8px 12px;
  border-radius: 8px;
  background: #f5f5f5;
}

.legeltetes-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.legeltetes-unit {
  font-size: 13px;
  color: #666;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px) {
  .app-layout {
    flex-direction: column;
  }

  .app-sidebar {
    width: 100%;
    flex: none;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .app-main {
    padding: 20px;
  }

  .app-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .app-header-logo {
    width: 90px;
  }

  .app-title {
    font-size: 24px;
  }

  .result-actions {
    flex-direction: column;
  }

  .result-actions .btn {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .login-card {
    padding: 28px 20px;
  }

  .login-logo {
    width: 140px;
  }

  .login-card h2 {
    font-size: 22px;
  }

  .landing-dropdown {
    min-width: 260px;
  }

  .legeltetes-grid {
    grid-template-columns: 1fr;
  }
}

h3{
margin-top:30px;
margin-bottom:10px;
font-size:18px;
border-bottom:1px solid #ddd;
padding-bottom:5px;
}

hr{
margin:25px 0;
border:none;
border-top:1px solid #ddd;
}

.app-sidebar{
position:sticky;
top:20px;
}

.sidebar-card{
background:#fff;
border:1px solid #ddd;
border-radius:14px;
padding:16px;
}

.sidebar-section{
margin-bottom:18px;
}

.sidebar-label{
font-weight:700;
margin-bottom:8px;
}

@media (max-width:900px){

.app-layout{
grid-template-columns:1fr;
}

.app-sidebar{
position:static;
}

}