/* 
background color: #FAF9F6; var(--bg-body) - jasne tło strony
color: var(--text-main);
drugorzędny kolor: #4A4A4A
background-color: #3E3730; - ciemny panel edytora
color: var(--text-muted); - szary tekst nagłówka
color: var(--text-dark); - ciemny tekst w edytorze
*/

/* Dark Mode - CSS Variables */
:root {
  /* LIGHT MODE - twoje obecne kolory */

  --bg-body: #FAF9F6;
  --bg-card: #ffffff;
  --bg-panel: #3e3e3e;
  --text-main: #1A1A1A;
  --text-muted: #6F665C;
  --text-dark: #464545;
  --border-light: #e1e5e9;
  --btn-light: #f7f0e3;
  --date-light: #a99c8b;
  --btn-hover: #d2c6b7;
  --focused-editor-bg: #ffffff;
  --btns-SaveAndCancel:#E4D4C4;
  --btns-SaveAndCancel-hover:#634c46;
  --btns-SaveAndCancel-text-hover:rgb(238, 238, 238);
  --search-category-focus: #959595;
  --active-btn: #cbbfae
}

[data-theme="dark"] {
  /* DARK MODE - ODWRÓCONE */
  --bg-body: #3e3e3e;       /* Ciemny grafit */
  --bg-card: #2a2a2a;        /* Trochę jaśniejszy */
  --bg-panel: #FAF9F6;       /* Grafitowy panel */
  --text-main: #dad8d5;      /* Jasny beż */
  --text-muted: #b8b6b3;     /* Średni beż */
  --text-dark: #dad6cf;      /* Wyblakły beż */
  --border-light: #404040;
  --btn-light: #211f1f;
  --date-light: #bbbab8;
  --btn-hover: #7f7f7f;
  --focused-editor-bg: #282626;
  --btns-SaveAndCancel: #634c46;
  --btns-SaveAndCancel-hover: #E4D4C4;
  --btns-SaveAndCancel-text-hover: #3e3e3e;
   --search-category-focus: #f9eeee;
   --active-btn: #262326;
}
/* CSS usual */

* {
  -webkit-tap-highlight-color: transparent;
}

button:focus,
a:focus,
select:focus,
input:focus,
textarea:focus {
  outline: none;
}

button:focus {
  outline: none;
}

button:active {
  transform: scale(0.97);
}

button:focus-visible {
  outline: none;
}

button {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(168, 159, 148, 0.45);
  outline-offset: 2px;
}

body {
    padding: 0;
    margin: 0;
    font-family: "Lora";
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    
}

h1, h2, h3, h4, h5, h6, p {
    margin: 0;
    padding: 0;
}

.page{
    max-width: 1000px;
    width: 85%;
    padding: 0 16px 100px;    
    margin: 0 auto;
}

#header_sec {
    text-align: center;
    padding-top: 20px;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

#h1header {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 6px;
}

#pheader {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.6;
    letter-spacing: 0.06em;
    margin-top: 8px;
}


/* MAIN JOURNAL EDITOR */

#journal{
    display: flex;
    flex-direction: column;
    max-width: 960px;
    width: 90%;
    margin: 0 auto;
    gap: 20px;
    padding: 12px;
    background-color: var(--bg-panel);
    border-radius: 8px;
    margin-bottom: 20px;
    border-radius: 24px;
     box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

#journal_editor{
   
    
    gap: 12px;
    width: 100%;
    border: none;
    padding: 20px 22px;
    resize: none;
    box-sizing: border-box;
    height: 260px;
    font-size: 18px;
    font-family: "Lora";
    line-height: 1.9;
    border-radius: 24px;
    letter-spacing: 0.03em;
    color: var(--text-dark);
}

#journal_editor {
  min-height: 200px;
  height: auto;
  overflow: hidden;
  background-color: var(--bg-body);
  
}

p#journal_label{
    color: var(--bg-body);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.10em;
    text-align: center;
    font-family: 'Lora'
}

#entry_category {
    padding: 10px 12px;
    border: none;
    border-radius: 24px;
    color: var(--text-dark);
    font-size: 16px;
    min-width: 180px;
    cursor: pointer;
    font-family: "Lora";
    outline: none;
    background-color: var(--bg-body);
}

#entry_title {
    padding: 10px 15px;
    font-family: "Lora";
    font-weight: 400;
    font-size: 23px;
    border: none;
    border-radius: 24px;
    box-sizing: border-box;
    letter-spacing: 0.05em;
    color: var(--text-dark);
    text-align: center;
    outline: none;
    background-color: var(--bg-body);
}
#journal_editor:focus {
    outline: none;
}

#save_journal_button {
    width: 100%;
    padding: 10px ;
    border: none;
    border-radius: 24px;
    background-color: var(--btn-light);
    color: var(--bg-panel);
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s;
}
@media (hover: hover) and (pointer: fine) {
  #save_journal_button:hover {
  background-color: var(--btn-hover);;
  transition: background-color 0.3s, transform 0.2s;
}
}

#save_journal_button:active {
  background-color: var(--active-btn);
  transform: translateY(0) scale(0.98);
}

/* ENTRIES */



#entries_sec {
    max-width: 960px;
    width: 90%;
    margin: 0px auto 0;
    
}

#search_input,
#categoryfilter {
  width: 320px;
  height: 50px;
  padding: 0 18px;
  border: 1px solid #D0C4B5;
  border-radius: 999px;
  font-size: 16px;
  font-family: "Lora";
  background-color: var(--bg-body);
  color: var(--text-dark);
  outline: none;
  box-sizing: border-box;
  box-shadow: 0 0 5px #A89F94;
  margin-bottom: 10px;
}

#search_input::placeholder {
  color: var(--text-muted);
}

#categoryfilter + #searchinput {
    margin-left: 0;  /* Reset margin */
    margin-bottom: 0;  /* Reset margin */
}

#categoryfilter {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  color: var(--text-muted);
  cursor: pointer;
  padding-right: 46px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2390877d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 12px;
}

#categoryfilter.has-value {
  color: var(--text-dark);
}

#search_input:focus,
#categoryfilter:focus {
  border-color: var(--search-category-focus);
  box-shadow: 0 0 0 2px rgba(70, 67, 63, 0.25);
}

@media (hover: hover) and (pointer: fine) {
  #search_input:hover,
#categoryfilter:hover {
  box-shadow: 0 4px 14px rgba(168, 159, 148, 0.25);
}
}


/* ENTRIES */

#entries_container {
  max-width: 100%;
  margin: 2rem 0 4rem;
  padding: 0;
}

.journal_entry {
  margin: 1rem 0 1.5rem 0;  /* tylko góra/dół, brak lewo/prawo */
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border-radius: 12px;
  border-left: 4px solid var(--bg-panel);
   box-shadow:
    0 10px 10px rgba(0, 0, 0, 0.12),
    0 2px 6px rgba(0, 0, 0, 0.06);
  font-family: "Lora";
}

.journal_entry_date {
  display: block;
  margin-bottom: 15px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--date-light);
  margin-top: -10px;
  
}

.journal_entry_content {
  margin: 0;
  line-height: 1.7;
  font-size: 1.05rem;
  color: var(--text-main);
  white-space: pre-wrap; /* zachowuje entery z textarea */
  letter-spacing: 0.05em;
  

}

.journal_entry {
  position: relative;
  padding: 28px 30px 24px;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .journal_entry:hover {
  box-shadow:
    0 20px 5px rgba(0, 0, 0, 0.18),
    0 10px 10px rgba(0, 0, 0, 0.06);
  transform: translatey(-2px);
  transition: transform 0.2s;
}
}


.journal_entry:not(:hover) {
  transition: transform 0.2s;
}

.journal_entry:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

@media (hover: hover) and (pointer: fine) {
  .entry-actions button:hover {
  opacity: 0.75;
  transform: scale(1.20);
}
}





.journal_entry_delete {
  position: absolute;
  top: 5px;
  right: 14px;
  border: none;
  background: transparent;
  color: var(--date-light);
  font-size: 25px;
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .journal_entry_delete:hover {
  color: var(--bg-panel);
  transform: scale(1.2);
  transition: color 0.3s;
}
}

.journal_entry_delete:not(:hover) {
  transition: color 0.3s;
}

.journal_entry_edit {
  position: absolute;
  top: 10px;
  right: 40px;
  border: none;
  background: transparent;
  color: var(--date-light);
  font-size: 18px;
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .journal_entry_edit:hover {
  color: var(--btn);
  transform: scale(1.2);
  transition: color 0.3s;
}
}

.journal_entry_edit:not(:hover) {
  transition: color 0.3s;
}


.journal_entry_title {
    margin-top: -5px;
    margin-bottom: 3px;
    font-size: 22px;
    font-weight: 450;
    color: var(--text-dark);
    letter-spacing: 0.05em;
}

#entry_detail {
  display: none;
  max-width: 800px;
  width: 90%;
  margin: 0px auto 120px;
  padding: 0px;
  margin-top: -30px;
}


.entry_detail_card {
  background: var(--bg-card);
  border-radius: 12px;
  border-left: 4px solid var(--bg-panel);
  box-shadow:
    0 18px 30px rgba(0, 0, 0, 0.12),
    0 4px 10px rgba(0, 0, 0, 0.06);
  padding: 26px 36px;
  position: relative;
  
}

.entry_detail_card h2 {
  font-size: 28px;
  margin-bottom: 8px;
  letter-spacing: 0.06em;
  color: var(--text-dark);
}

.entry_detail_card small {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--date-light);
  margin-bottom: 24px;
}

.entry_detail_card p {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text-main);
}

.full-entry-content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}


/* DETAIL BTNS */
#BackAllEntries {
  border: none;
  background-color: var(--btn-light);
  color:var(--bg-panel);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0px 14px;
  border-radius: 999px;
  cursor: pointer;
  margin-bottom: 16px;
  box-shadow: 2px 0px 10px rgba(99, 76, 70, 0.267);
}

@media (hover: hover) and (pointer: fine) {
  #BackAllEntries:hover {
  background-color: var(--btn-hover);
  transform: translateY(-1px);
  transition: 0.2s;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12)
}
}


#BackAllEntries:not(:hover) {
  transition: 0.2s;
}

#BackAllEntries:active {
  background-color: var(--active-btn);
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15)
}

.detail-actions-bottom {
  display: none;
}

.detail-header-btn {
  border: none;
  background-color: var(--btn-light);
  color: var(--bg-panel);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  margin-bottom: 16px;
   box-shadow: 2px 0px 10px rgba(99, 76, 70, 0.267);
   
}

.detail-header-right {
    display: flex;
    gap: 12px;
}

@media (hover: hover) and (pointer: fine) {
  .detail-header-btn:hover {
  background-color: var(--btn-hover);
  transition: 0.2s;
  
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12)
  
}
}

.detail-header-btn:not(:hover) {
  transition: 0.2s;
}

.detail-header-btn:active {
   background-color: var(--active-btn);
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15)
}

.dark .detail-header-btn #BackAllEntries {
    box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 6px 14px rgba(0,0,0,0.35);
  
}


/* CATEGORY BADGE */


.category-badge {
   background: var(--bg-panel);
    color: var(--bg-body);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 200;
    letter-spacing: 0.05em;
    margin-top: -16px;
    display: inline-block;
}





#readMode .category-badge {
    margin-top: -12px
}



.title_category {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}
.filters_row {
    display: flex;
    justify-content: space-between;  /* Search LEWO, select PRAWO */
    align-items: center;
    margin-bottom: -20px;
    margin-top: 60px;
    gap: 12px;  /* Odstęp między */
    padding-bottom: 0px;
}


.entry_detail_header {
    padding: 0px;
    margin-bottom: 0px;
    margin-top: -50px;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: left;
   
}






.title_category_detail {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;  /* Wyrównaj do góry */
    gap: 16px;
    margin-bottom: 0px;
    color: var(--text-dark);
}

/* Tytuł w szczegółach - taka sama grubość jak lista */
#readMode h2 {
    font-weight: 450;  /* Średni, nie bold */
    font-size: 28px;
    margin: 0 0 12px 0;
    line-height: 1.3;
    color: var(--text-dark);
    
}


.detail_meta {
    display: block;
    margin-bottom: 0px;
    
}


/* EDIT MODE */


/* Edit title input */
#editTitle {
    font-weight: 400;
    border: none;
    background-color: var(--bg-body);
    box-shadow: 0 0 5px #A89F94;
    text-align: center;
}

#editTitle {
    width: 95%;
    margin: 0;
    border: 0px solid #e9e7e1;
    box-shadow: 0 0 5px #A89F94;
    background-color: var(--bg-body);
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 16px;
    font-family: inherit;
    color: var(--text-dark);
    letter-spacing: 0.08em;
    box-shadow: 1px 1px 10px #a89f9462;
}

#editContent {
    width: 95%;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 20px;
    min-height: 250px;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.7;
    background-color: var(--bg-body);
    resize: vertical;
    margin-bottom: 20px;
    box-shadow: 1px 1px 10px #a89f9462;
    color: var(--text-dark);
}

#editCategory {
    border: 1px solid #e9e7e1;
    background-color: var(--bg-body);
    border-radius: 12px;
    padding: 12px 16px;
    width: 180px;
    background: var(--bg-body);
    font-family: inherit;
    font-size: 14px;
    box-shadow: 1px 1px 10px #a89f9462;
    color: var(--text-dark);
}



#editTitle:focus, #editCategory:focus, #editContent:focus {
    background: var(--focused-editor-bg);
    outline: none;
}

.edit_category_row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 20px;
}



.save-edit-button, .cancel-edit-button {
    border: none;
    border-radius: 20px;
    padding: 8px 24px;
    font-weight: 400;
    cursor: pointer;
    flex-shrink: 0;
    font-family: inherit;
    font-size: 14px;
    
    
}

.cancel-edit-button{
  background-color: var(--btns-SaveAndCancel);
    color: var(--bg-panel);
    box-shadow: 1px 5px 2px rgba(99, 76, 70, 0.495);
}
.save-edit-button {
    background-color: var(--btns-SaveAndCancel);
    color: var(--bg-panel);
    box-shadow: 1px 5px 2px rgba(99, 76, 70, 0.467);
    
}
@media (hover: hover) and (pointer: fine) {
  .save-edit-button:hover {
    
    background: var(--btns-SaveAndCancel-hover);
    color: var(--btns-SaveAndCancel-text-hover);
    transform: translateY(-1px);
    transition: background-color 0.3s, color 0.3s;
    box-shadow: 3px 8px 2px rgba(99, 76, 70, 0.3);
    transition: all 0.3s;
}

.cancel-edit-button:hover {
    background: var(--btns-SaveAndCancel-hover);
    color: var(--btns-SaveAndCancel-text-hover);
    transition: color 0.3s, color 0.3s;
    transform: translateY(-1px);
    box-shadow: 3px 8px 2px rgba(99, 76, 70, 0.3);
    transition: all 0.3s;
}
}


.save-edit-button:not(:hover) {
    
   background-color: var(--btns-SaveAndCancel);
    color: var(--bg-panel);
    box-shadow: 1px 5px 2px rgba(99, 76, 70, 0.3);
    transition: all 0.3s;

}

.cancel-edit-button:not(:hover) {
    
   background-color: var(--btns-SaveAndCancel);
    color: var(--bg-panel);
    box-shadow: 1px 5px 2px rgba(99, 76, 70, 0.3);
    transition: all 0.3s;

}

.cancel-edit-button:active, .save-edit-button:active {
    background-color: var(--active-btn);
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15)
}

.title_category_after_edit {
 
    display: flex;
    justify-content: space-between;
    align-items: flex-start;  /* Wyrównaj do góry */
    gap: 16px;
    margin-bottom: 0px;
}

/* 08.01.2025 */

#toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  margin-top: 30px;
}


.theme-toggle {
  border: none;
  background: transparent;
  color: var(--btn-SaveAndCancel);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  background: var(--btn-light);
  box-shadow: 2px 0px 10px rgba(99, 76, 70, 0.267);

  
}

@media (hover: hover) and (pointer: fine) {
  .theme-toggle:hover {
  background: var(--btn-hover);
  transition: 0.2s;
}
}

.theme-toggle:not(:hover) {
  transition: 0.2s;
}

/* MEDIA */

@media (max-width: 600px) {

  * {
    box-sizing: border-box;
  }

  body {
    overflow-x: hidden;
    margin: 0;
    padding-bottom: 20px;
  }

  .page {
    width: 100vw;
    max-width: 100vw;
    padding: 0 6px 30px;
    margin: 0;
  }

  #header_sec {
    padding: 20px 0 10px;
  }

  #h1header {
    font-size: 28px !important;
    letter-spacing: 2px;
  }

  #pheader {
    font-size: 14px;
    padding: 0 4px;
  }

   #journal {
    width: calc(100% - 32px);
    padding: 18px 14px 16px;
    border-radius: 22px;
    margin-top: 22px;
  }

  #journal_label {
  display: block;
  line-height: 0.8;
   
}

  #entry_title {
    font-size: 16px;
    padding: 8px 12px;
  }

  #journal_editor {
  font-size: 16px;
  padding: 12px 16px;
  min-height: 140px;
  max-height: 42vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}


  #save_journal_button {
    padding: 10px 0;
    font-size: 12px;
    width: 80%;
     margin: 0 auto;
     display: block;
     border-radius: 999px;
  }
  .filters_row {
    flex-direction: column;
    gap: 8px;
    margin: 20px 0;
  }

  #search_input,
  #categoryfilter {
    width: 100%;
    font-size: 16px;
  }

  #entries_sec {
    margin-bottom: 20px;
  }

  .journal_entry {
    padding: 14px 12px;
    margin: 8px 0;
  }

  .entry_detail {
    margin: 10px 0 40px;
    padding: 0 4px;
  }

  .entry_detail_card {
    padding: 20px 12px;
  }

.edit_category_row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-bottom: -8px;
    
  }

  @media (max-width: 600px) {

    .detail-actions-top {
  display: none;
}

  .entry_detail_header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-top: 8px;
  margin-bottom: 10px;
}

#BackAllEntries {
  width: fit-content;
  align-self: flex-start;
  margin-bottom: 0;
  padding: 10px 16px;
  font-size: 13px;
  opacity: 0.8;
}


.detail-actions-bottom {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  width: 60%;
  margin-top: 22px;
  margin-left: auto;
}

.detail-actions-bottom .detail-header-btn {
  flex: 1;
  min-height: 40px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  font-size: 11px;
}
  
  }
  
  #editCategory {
    width: 95%;

  }
  .save-edit-button  {
    width: 95%;
    margin-bottom: 8px;
    margin-top: 8px;
    font-size: 16px;
    border-radius: 999px;
  }
  .cancel-edit-button {
    width: 95%;
    margin-bottom: 8px;
    font-size: 16px;
    border-radius: 999px;
  }

}

@media (max-width: 600px) {
  h1 {
    font-size: 28px;
  }

  .subtitle {
    font-size: 14px;
    padding: 0 16px;
  }
}

@media (max-width: 600px) {
  textarea {
    min-height: 120px; /* zamiast gigantycznego */
  }

  .form-container {
    padding: 16px;
  }
}

@media (max-width: 600px) {
  .controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .controls input,
  .controls select {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .action-buttons {
    flex-wrap: wrap;
    gap: 8px;
  }

  .action-buttons button {
    flex: 1;
    min-width: 30%;
  }
}

@media (max-width: 600px) {
  .edit-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .edit-actions button {
    width: 100%;
  }
} 

@media (max-width: 600px) {
  #authSec {
  display: block;
  min-height: auto !important;
  width: 100%;
  max-width: 420px;
  margin: 24px auto 0 !important;
  padding: 0 16px;
  box-sizing: border-box;
}

  .auth-card {
  width: 100%;
  margin: 0 auto;
  padding: 28px 22px;
  border-radius: 14px;
  box-sizing: border-box;
}

  .auth-btn {
    width: 100%;
  }

  @media (max-width: 600px) {
  .title_category {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  padding-right: 90px;
}

  .title_category .category-badge {
    display: block;
    width: fit-content;
    margin-top: 10px;
  }

  .category-badge {
  margin-bottom: 6px;
}

  .journal_entry_title {
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.15;
    margin-bottom: 0;
  }
}
}



/* AUTH */

#authSec {
  width: 100%;
  max-width: 620px;
  margin: 32px auto 0;
  padding: 0 16px;
  box-sizing: border-box;
}

.auth-card {
    background: var(--bg-panel);
    padding: 40px 48px;
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.18);
    text-align: center;
    
    width: 100%;
    box-sizing: border-box;
    
}

.auth-subtitle {
    font-size: 16px;
    margin-bottom: 24px;
    color: var(--bg-body);
      letter-spacing: 0.08em;
}

.auth-btn {
    background-color: var(--btn-light);
    border: 0px solid #e9e7e1;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s ease;
    color: var(--bg-panel);
     box-shadow: 1px 5px 2px rgba(99, 76, 70, 0.495);
    font-size: 14px;
     letter-spacing: 0.08em;
     width: 80%;
}

@media (hover: hover) and (pointer: fine) {
  .auth-btn:hover {
    background-color: var(--btn-hover);
    transform: translateY(-1px);
}
}



.auth-error {
    color: #c0392b;
    margin-top: 16px;
    font-size: 14px;
}

#logoutBtn {
    border: none;
  background: transparent;
  color: var(--btn-SaveAndCancel);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  background: var(--btn-light);
  box-shadow: 2px 0px 10px rgba(99, 76, 70, 0.267);
  
}
@media (hover: hover) and (pointer: fine) {
  #logoutBtn:hover {
  background: var(--btn-hover);
  transition: 0.2s;
}
}





/* ===================
      TOAST NOTIFICATION 
      =================*/
.toast {
  position: fixed;

  left: 50% !important;
  right: auto !important;
  top: 80px;

  transform: translateX(-50%) translateY(-10px);

  width: max-content;
  max-width: min(90vw, 420px);
  min-width: 160px;

  padding: 14px 20px;
  border-radius: 20px;

  background: var(--bg-panel);
  color: var(--bg-body);

  font-size: 15px;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  word-break: break-word;

  box-sizing: border-box;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);

  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;

  pointer-events: none;
  z-index: 9999;
}

.toast.show {
  opacity: 0.9;
  transform: translateX(-50%) translateY(0);
}


/* ===================
      DELETE CONFIRMATION 
      =================*/

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(3px);
  z-index: 10000;
}

.modal.hidden {
  display: none;
}

.modal_content {
  width: min(420px, calc(100vw - 32px));
  margin: 0;
  background: var(--bg-card);
  color: var(--text-main);
  border-radius: 18px;
  padding: 28px 24px 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border-light);
}

.modal_text {
  margin: 0 0 22px;
  font-size: 18px;
  line-height: 1.5;
  text-align: center;
}

.modal_actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.btn_secondary,
.btn_danger {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

.btn_secondary {
  background: var(--btn-light);
  color: var(--bg-panel);
}

.btn_danger {
  background: #d95c4f;
  color: white;
}

@media (hover: hover) and (pointer: fine) {
  .btn_secondary:hover {
  background: var(--btn-hover);
  transition: background-color 0.1s;
  
}
.btn_danger:hover {
  background: #c0392b;
  transition: background-color 0.1s;
  
}
}


/* ===================
      EMPTY STATE
      ================ */

      .empty_state {
  text-align: center;
  padding-top: 28px;
  
}

.empty_state_title {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 500;
  color: var(--text-dark);
  letter-spacing: 0.04em;
}

.empty_state_text {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ===================
DROPDOWN CATEGORY
===================== */

.category_input_wrap {
  position: relative;
  width: 100%;
}

.category_dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
  padding: 8px;
  z-index: 200;
  max-height: 220px;
  overflow-y: auto;
}

.category_dropdown.hidden {
  display: none;
}

.category_option {
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-main);
  transition: background-color 0.2s ease, transform 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
  .category_option:hover {
  background: var(--btn-light);
}
}


.category_option:active {
  transform: scale(0.99);
}

#entry_category {
  width: 100%;
  box-sizing: border-box;
}

/* ====================

    WSZYSTKIE HOVER 

=======================*/

