@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: #0a0e17;
    color: #e2e8f0;
    min-height: 100vh;
}

input, select, button, textarea {
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    border: none;
    background: none;
    color: inherit;
}

input[type="text"], input[type="email"], input[type="password"], select {
    background: #1a2332;
    border-radius: 8px;
    border: 1px solid #2d3748;
    color: #e2e8f0;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: border-color 0.2s, background 0.2s;
    margin: 0 2px;
    box-sizing: border-box;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder {
    color: #64748b;
    opacity: 0.8;
}

input[type="text"]:focus, 
input[type="email"]:focus, 
input[type="password"]:focus, 
select:focus {
    border-color: #3b82f6;
    background: #232f3e;
}

select {
    min-width: 120px;
    background: #1a2332;
    color: #e2e8f0;
    padding-right: 1.5rem;
    cursor: pointer;
}

button {
    cursor: pointer;
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s, transform 0.1s;
    user-select: none;
    padding: 0.75rem 1.25rem;
}

.utility-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 16px;
    position: relative;
}

.utility-btn {
    background: #1e293b;
    color: #a5b4fc;
    border-radius: 8px;
    font-size: 0.95rem;
    border: 1px solid #2d3748;
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.utility-btn:hover {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
    transform: translateY(-1px);
}

/* Profile and Dropdown Styles */
.profile-container {
    position: relative;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #1e293b;
    border-radius: 8px;
    border: 1px solid #2d3748;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.profile-info:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    transform: translateY(-1px);
}

.profile-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: linear-gradient(145deg, #1e293b, #141b29);
    border: 1px solid #2d3748;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    flex-direction: column;
    min-width: 160px;
    z-index: 100;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding: 0.5rem 0;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 12px;
    width: 12px;
    height: 12px;
    background: #1e293b;
    border-top: 1px solid #2d3748;
    border-left: 1px solid #2d3748;
    transform: rotate(45deg);
    z-index: -1;
}

.dropdown-menu.active {
    display: flex;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.dropdown-item {
    background: transparent;
    color: #a5b4fc;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    text-align: center; /* Centered text */
    border-radius: 0;
    transition: background 0.2s, transform 0.3s ease; /* Added transform transition */
    position: relative;
}

.dropdown-item:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 1px;
    background: #2d3748;
    opacity: 0.5;
}

.dropdown-item:hover {
    background: #3b82f6;
    color: #ffffff;
    border-radius: 4px;
    margin: 0 0.25rem;
    transition: 200ms ease-in-out;
}

.dropdown-item:not(:hover) {
    transform: translateX(0); /* Return to original position on unhover */
        transition: 200ms ease-in-out;
}

header {
    width: 100%;
    background: #0f172a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid #2d3748;
    position: relative;
    z-index: 10;
}

.header-flex {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    min-height: 64px;
    flex-wrap: wrap;
}

h1 {
    margin: 0 0 0 18px;
    font-size: 1.75rem;
    font-weight: 600;
    color: #3b82f6;
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
    letter-spacing: 0.5px;
    text-align: left;
    width: auto;
    user-select: none;
}
#infoBtn {
    pointer-events: auto; /* το infoBtn clickable ακόμα κι αν ο γονέας έχει none */
}

.categories-nav {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
    margin-right: 20px;
    z-index: 2;
    background: #1e293b;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #2d3748;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.category-btn {
    background: #1a2332;
    border: 1px solid #2d3748;
    color: #a5b4fc;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.category-btn:hover {
    background: #334155;
    color: #ffffff;
}

.category-btn.active {
    background: #3b82f6;
    color: #ffffff;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

/* -------- SUPER SEARCHBAR -------- */
.super-searchbar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
    max-width: 750px;
    margin: 1.5rem auto 2rem auto;
    background: #1e293b;
    border-radius: 10px;
    border: 1px solid #2d3748;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    flex-wrap: wrap;
}

#searchInput {
    flex: 2 1 240px;
    min-width: 160px;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #2d3748;
    background: #1a2332;
    color: #e2e8f0;
    font-size: 1rem;
    transition: all 0.2s;
}

.super-searchbar button {
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

#mainActionBtn {
    background: #3b82f6;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

#mainActionBtn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

#editBtn {
    background: #10b981;
    color: #ffffff;
}

#editBtn:hover {
    background: #059669;
    transform: translateY(-1px);
}

#deleteBtn {
    background: #ef4444;
    color: #ffffff;
}

#deleteBtn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* -------- BUTTONS & CONTAINERS -------- */
.button-section {
    max-width: 1200px;
    margin: 2rem auto 0 auto;
    padding: 1.5rem 1rem;
}

.button-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 1.5rem 1.2rem;
}

.dynamic-button {
    background: #1a2332;
    border: 1px solid #2d3748;
    border-radius: 12px;
    color: #e2e8f0;
    width: 20%;
    min-width: 380px;
    max-width: 380px;
    box-sizing: border-box;
    padding: 1rem;
    margin: 0.5rem 0 1.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.dynamic-button:hover {
    background: #232f3e;
    border-color: #3b82f6;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

.button-title {
    font-weight: 600;
    color: #ffffff;
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 0.75rem;
    margin-top: 0.25rem;
    letter-spacing: 0.5px;
    width: 100%;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #2d3748;
    display: flex;
    align-items: center;
    justify-content: center;
}

.button-main {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.button-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    width: 80%;
}

.button-email, .button-password {
    font-size: 0.95rem;
    color: #cbd5e1;
    word-break: break-all;
    background: #1e293b;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    width: 100%;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.button-email:hover, .button-password:hover {
    background: #2d3748;
}

/* Password container */
.password-container {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
    background: #1e293b;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
}

.button-password {
    flex-grow: 1;
    word-break: break-all;
}

.toggle-password {
    cursor: pointer;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: all 0.2s;
}

.toggle-password:hover {
    opacity: 1;
    transform: scale(1.05);
}

.button-img {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 10px;
    vertical-align: middle;
    background: #1e293b;
}

/* -------- MODALS -------- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #1a2332;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #2d3748;
    max-width: 420px;
    width: 95vw;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.modal-content h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    color: #3b82f6;
    text-align: center;
    font-weight: 600;
}

.modal-content label {
    color: #a5b4fc;
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
    font-weight: 500;
    display: block;
}

.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content input[type="password"] {
    margin: 0.1rem 0 0.4rem 0;
    font-size: 0.95rem;
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 8px;
    border: 1px solid #2d3748;
    padding: 0.65rem 1rem;
    width: 100%;
    transition: all 0.2s;
}

.modal-content input:focus {
    border-color: #3b82f6;
    background: #232f3e;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

/* Button row at bottom */
.modal-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
    justify-content: flex-end;
}

.modal-buttons button {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    flex: 1;
}

#save-edit-button,
#submit-login-button,
#passwordModalOk,
#confirmModalOk {
    background: #3b82f6;
    color: #ffffff;
}

#save-edit-button:hover,
#submit-login-button:hover,
#passwordModalOk:hover,
#confirmModalOk:hover {
    background: #2563eb;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

#cancel-edit-button,
#cancel-login-button,
#passwordModalCancel,
#confirmModalCancel {
    background: #1e293b;
    color: #e2e8f0;
    border: 1px solid #2d3748;
}

#cancel-edit-button:hover,
#cancel-login-button:hover,
#passwordModalCancel:hover,
#confirmModalCancel:hover {
    background: #2d3748;
    color: #ffffff;
}

/* Image upload section */
.image-upload-section {
    margin: 0.2rem 0 0.5rem;
}

.input-with-x {
    position: relative;
    width: 100%;
    margin-top: 2px;
}

#editImage {
    width: 100%;
    padding-right: 36px !important;
    box-sizing: border-box;
}

.remove-img-x-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #ef4444;
    font-size: 1.2rem;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    opacity: 0.8;
}

.remove-img-x-btn:hover {
    background: #fee2e2;
    color: #dc2626;
    opacity: 1;
}

.upload-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.upload-btn {
    background: #3b82f6;
    color: #ffffff;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    order: 0;
}

.upload-btn:hover {
    background: #2563eb;
}

.upload-status {
    font-size: 0.85rem;
    color: #34d399;
    margin: 0;
    text-align: center;
    order: 1;
}

.img-preview {
    order: 2;
    width: 50px;
    height: 50px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    display: none;
    border: 1px solid #2d3748;
}

/* Ensure file input is hidden */
#imageUploadInput,
#import-file {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

/* -------- NOTIFICATIONS -------- */
#notify-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    z-index: 99999;
    pointer-events: none;
}

.copy-notification {
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 10px;
    border: 1px solid #3b82f6;
    padding: 10px 24px;
    font-size: 0.95rem;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0.95;
    animation: fadeInOut 2s;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    15% { opacity: 0.95; }
    85% { opacity: 0.95; }
    100% { opacity: 0; }
}

/* -------- FOOTER -------- */
.page-footer {
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
    border-top: 1px solid #2d3748;
    width: 100vw;
    left: 0;
    bottom: 0;
    position: fixed;
    background: #0a0e17;
    z-index: 99;
    margin: 0;
    padding: 14px 0 8px 0;
}

/* Login Modal */
#loginModal .modal-content,
#confirmModal .modal-content,
#passwordModal .modal-content {
    background: #1a2332;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #2d3748;
    max-width: 420px;
    width: 95vw;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

#loginModal h2,
#confirmModal h2,
#passwordModal h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    color: #3b82f6;
    text-align: center;
    font-weight: 600;
}

#loginModal label,
#confirmModal label,
#passwordModal label {
    color: #a5b4fc;
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
    font-weight: 500;
    display: block;
}

#loginModal input[type="email"],
#loginModal input[type="password"],
#passwordModal input[type="password"] {
    margin: 0.1rem 0 0.4rem 0;
    font-size: 0.95rem;
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 8px;
    border: 1px solid #2d3748;
    padding: 0.65rem 1rem;
    width: 100%;
    transition: all 0.2s;
}

#loginModal input:focus,
#passwordModal input:focus {
    border-color: #3b82f6;
    background: #232f3e;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

#confirmModalMsg {
    color: #e2e8f0;
    font-size: 1rem;
    text-align: center;
    margin: 0.5rem 0;
}
/* Προσθήκη στο styles.css */
.info-side-panel {
  position: fixed;
  top: 64px;
  left: -420px;
  width: 400px;
  height: calc(100vh - 64px - 40px);
  background: linear-gradient(145deg, #121a27, #0d1421); /* Πιο σκούρη απόχρωση */
  border-right: 1px solid #1e2a3d; /* Πιο έντονο border */
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
  z-index: 100;
  transition: transform 0.3s ease-out;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.info-side-panel.active {
  transform: translateX(420px);
}

.info-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #1e2a3d;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.95); /* Ημιδιάφανο background */
  backdrop-filter: blur(5px); /* Εφέ θόλωσης */
  position: sticky;
  top: 0;
  z-index: 1;
}

.info-header h2 {
  margin: 0;
  color: #3b82f6;
  font-size: 1.3rem;
}

.close-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.8rem;
  cursor: pointer;
  transition: color 0.2s;
  padding: 0 0.5rem;
  line-height: 1;
}
.custom-info-icon svg {
    vertical-align: -0.14em;
    position: relative;
    top: 0px; /* ή -1px ή 0px, παίξε με την τιμή */
    cursor: pointer;
    transition: transform 0.16s;
}
.custom-info-icon svg:hover {
    transform: scale(1.12) rotate(-5deg);
}


.close-btn:hover {
  color: #ef4444;
}

.info-content {
  padding: 1.5rem;
  flex-grow: 1;
  overflow-y: auto;
}

.info-card {
  background: rgba(30, 41, 59, 0.6);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #2d3748;
  display: flex;
  align-items: flex-start;
  transition: all 0.2s;
}

.info-card:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.info-icon {
  font-size: 1.5rem;
  margin-right: 1rem;
  color: #3b82f6;
  flex-shrink: 0;
  margin-top: 2px;
}

.info-text h3 {
  margin: 0 0 0.4rem 0;
  color: #e2e8f0;
  font-size: 1rem;
}

.info-text p {
  margin: 0;
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.5;
}
/* Minimal dark scrollbar για το info-side-panel */
.info-side-panel, .info-content {
  scrollbar-width: thin;
  scrollbar-color: #262e3a #121a27; /* thumb, track */
}

/* Για Chrome, Edge, Opera */
.info-side-panel::-webkit-scrollbar,
.info-content::-webkit-scrollbar {
  width: 7px;
  background: #101521;   /* dark background */
  border-radius: 6px;
}
.info-side-panel::-webkit-scrollbar-thumb,
.info-content::-webkit-scrollbar-thumb {
  background: #262e3a;      /* thumb */
  border-radius: 7px;
  min-height: 30px;
  border: 2px solid #101521; /* slim border around */
}
.info-side-panel::-webkit-scrollbar-thumb:hover,
.info-content::-webkit-scrollbar-thumb:hover {
  background: #3b82f6;
}
.info-side-panel::-webkit-scrollbar-corner,
.info-content::-webkit-scrollbar-corner {
  background: #101521;
}
#addCategoryBtn svg {
    display: block;
    transition: transform 0.14s;
}
#addCategoryBtn:hover svg {
    transform: scale(1.55);
}
#addCategoryBtn {
    background: #181f2d;
    border: 1.5px solid #2d3748;
    border-radius: 8px;
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    margin-left: 4px;
    box-shadow: 0 1px 8px #15223b33;
}
.categories-nav {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  max-width: 780px;    /* Φτάνει για πολλές κατηγορίες! */
  margin: 0 auto;
  scrollbar-width: thin;
  scrollbar-color: #3b82f6 #181f2d;
  padding: 0.35em 0.6em;
  border-radius: 8px;
  justify-content: center;
  align-items: center;
  background: #10192a;
  box-shadow: 0 2px 10px #11214d12;
}
.categories-nav::-webkit-scrollbar {
  height: 6px;
  background: #181f2d;
  border-radius: 5px;
}
.categories-nav::-webkit-scrollbar-thumb {
  background: #3b82f6;
  border-radius: 8px;
}
.category-btn.active, .category-btn:hover, .category-btn:focus {
  background: #3b82f6;
  color: #fff;
}
#addCategoryBtn {
  background: #23243b;
  color: #3b82f6;
  font-size: 1.17em;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
}
