:root{
  --ctrl-radius: 4px; /* default for the whole panel */
}

/* ====== Βασικά ====== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f3f4f6;
    color: #111827;
}

/* Κεντρικό layout: sidebar + main content */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: row;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: #020617;
    color: #e5e7eb;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
}

.sidebar nav {
    flex: 1;
}

.sidebar .logo {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
	text-align: center; 
}

.sidebar nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar nav li {
    margin-bottom: 6px;
}

.sidebar nav a {
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    color: #e5e7eb;
    text-decoration: none;
    font-size: 14px;
}

.sidebar nav a:hover {
    background: #1f2937;
}

.sidebar nav a.active {
    background: #2563eb;
}

.sidebar-footer {
    padding: 10px 16px 12px 16px;
    border-top: 1px solid #1f2933;
    font-size: 11px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-footer-logo {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-footer-logo img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.sidebar-footer-text {
    text-align: center;
    flex: 1;
}

.sidebar-footer-text a {
    color: inherit;
    text-decoration: none;
}

.sidebar-footer-text a:hover {
    text-decoration: underline;
}

.sidebar-footer-text strong {
    font-weight: 600;
    color: #e5e7eb;
}

/* Main area */
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Header μέσα στο main */
.page-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-header h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
}

.page-header .user-actions {
    font-size: 14px;
}

.page-header .user-actions a {
    color: #4b5563;
    text-decoration: none;
    margin-left: 12px;
}

.page-header .user-actions a:hover {
    text-decoration: underline;
}

/* Περιεχόμενο */
.page-content {
    max-width: 1100px;
    width: 100%;
    margin: 24px auto 40px;
    padding: 0 24px;
}

.page-header {
    background: linear-gradient(135deg, #1f2937, #111827);
    color: #f9fafb;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.page-header .user-actions a {
    color: #e5e7eb;
    text-decoration: none;
    margin-left: 16px;
    font-size: 14px;
}

.page-header .user-actions a:hover {
    text-decoration: underline;
}

/* Περιεχόμενο */
.page-content {
    max-width: 1100px;
    width: 100%;
    margin: 24px auto 40px;
    padding: 0 16px;
}

/* Card-style blocks */
.card {
    background: #ffffff;
    border-radius: 10px;
    padding: 18px 20px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    margin-bottom: 16px;
}

.card h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

/* Messages */
.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 14px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 14px;
}

/* Menu list (όπως στο index και τα “Μενού”) */
ul {
    padding-left: 20px;
}

ul li {
    margin-bottom: 6px;
}

/* Links / buttons */
a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.btn,
button,
input[type="submit"] {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    border: none;
    background: #2563eb;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}

.btn-secondary {
    background: #6b7280;
}

.btn:hover,
button:hover,
input[type="submit"]:hover {
    background: #1d4ed8;
}

/* Φόρμες */
form div {
    margin-bottom: 8px;
}

label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    max-width: 320px;
    padding: 7px 9px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    font-family: inherit;
    margin-top: 2px;
}

textarea {
    max-width: 100%;
    min-height: 100px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

/* Πίνακες */
table {
    border-collapse: collapse;
    width: 100%;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    font-size: 14px;
}

table thead {
    background: #f3f4f6;
}

table th,
table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

table th {
    font-weight: 600;
    color: #374151;
}

table tr:nth-child(even) td {
    background: #f9fafb;
}

table tr:last-child td {
    border-bottom: none;
}

/* Μικρά helpers */
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }

.text-muted {
    color: #6b7280;
    font-size: 13px;
}

/* Διάταξη δύο στηλών μέσα στη σελίδα */
.layout-two-columns {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 16px;
}

@media (max-width: 900px) {
    .layout-two-columns {
        grid-template-columns: 1fr;
    }
}

/* Πίνακες με οριζόντιο scroll σε μικρές οθόνες */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

/* Κουμπί-κείμενο (π.χ. για Διαγραφή μέσα σε πίνακα) */
.link-button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: #2563eb;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
}

/* Πίνακες με οριζόντιο scroll σε μικρές οθόνες */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

/* Κουμπί-κείμενο (π.χ. για Διαγραφή μέσα σε πίνακα) */
.link-button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: #2563eb;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
}

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

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

    .sidebar nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }

    .sidebar nav li {
        margin-bottom: 0;
    }

    .sidebar nav a {
        padding: 6px 8px;
        font-size: 13px;
    }

    .page-content {
        padding: 0 12px;
        margin-top: 16px;
    }
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.btn-small {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #4b5563;
    font-size: 13px;
    text-decoration: none;
    color: #e5e7eb;
    background: #111827;
}

.btn-small:hover {
    background: #1f2937;
}

/* Νέο layout για σελίδα templates: λίστα αριστερά, φόρμα + μεταβλητές δεξιά */
.templates-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.4fr);
    gap: 16px;
    align-items: flex-start;
}

.templates-grid-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.templates-grid-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (max-width: 1100px) {
    .templates-grid {
        grid-template-columns: 1fr;
    }
}

.link-button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    color: #2563eb; /* ή ό,τι έχεις ήδη */
}

.link-button-danger {
    color: #dc2626;
}

.link-button-danger:hover {
    color: #dc2626;
    text-decoration: none;
}

.dashboard-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.dashboard-stat {
    min-width: 180px;
}

.dashboard-stat-label {
    font-size: 13px;
    color: #6b7280;
}

.dashboard-stat-value {
    font-size: 26px;
    font-weight: 600;
    margin-top: 4px;
}

/* Link-style buttons (π.χ. “Προβολή” στις Κριτικές) */
.btn-link{
  background: transparent;
  color: #2563eb;
  padding: 0;
  border: none;
  border-radius: 0;
  font: inherit;
  cursor: pointer;
}

.btn-link:hover,
.btn-link:active{
  background: transparent;
  color: #1d4ed8;
  text-decoration: underline; /* αν δεν το θες, βάλ’ το none */
}

.btn-link:focus-visible{
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

/* ===== Settings form alignment ===== */
.settings-form{
  max-width: 760px;
}

.settings-form .form-line{
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 12px;
  align-items: center;
  margin: 12px 0;
}

.settings-form .form-line label{
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
}

.settings-form .control{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.settings-form .control input,
.settings-form .control select{
  width: 100%;
  min-width: 0;
}

.settings-form .form-actions{
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

/* Mobile: stack label πάνω από input */
@media (max-width: 720px){
  .settings-form .form-line{
    grid-template-columns: 1fr;
    align-items: start;
  }
}

/* Sidebar section separator + label */
.sidebar nav ul .sidebar-sep{
  height: 1px;
  background: rgba(148, 163, 184, 0.22);
  margin: 12px 12px;
  border-radius: 999px;
}

.sidebar nav ul .sidebar-section-label{
  padding: 6px 14px 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .7;
}

/* Ensure active state doesn't "move" items */
.sidebar nav ul li a{
  display: flex;           /* keeps stable height */
  align-items: center;
  min-height: 38px;        /* stable row height */
  box-sizing: border-box;  /* active border won't change layout */
}

.sidebar nav ul li a.active{
  /* Important: don’t change padding/margin on active */
  margin: 0;
}

/* ===== Sidebar upgrades (icons + settings group + sticky footer) ===== */
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.sidebar .sidebar-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    padding-bottom: 10px;
}

.sidebar .sidebar-footer {
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    background: #020617;
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* Menu layout */
.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0 10px;
}

.sidebar-menu > li { margin: 2px 0; }

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    text-decoration: none;
}

.sb-ico {
    width: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.92;
}

.sb-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Separator + section label */
.sb-sep {
    height: 1px;
    margin: 10px 6px;
    background: rgba(255,255,255,0.10);
    border-radius: 999px;
}

.sb-section-title {
    padding: 6px 12px 6px;
    font-size: 12px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: rgba(229, 231, 235, 0.65);
}

/* Expandable settings group */
.sb-parent {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 9px 12px;
    border-radius: 10px;
    min-height: 38px;
    text-align: left;
}

.sb-parent:hover { background: rgba(255,255,255,0.06); }

.sb-caret {
    margin-left: auto;
    opacity: 0.7;
    transition: transform 160ms ease;
}

.sb-group.is-open .sb-caret { transform: rotate(180deg); }

.sidebar-menu a,
.sb-parent {
    font-size: 13.5px;
    line-height: 1.15;
}

.sb-sub {
    list-style: none;
    margin: 6px 0 0;
    padding: 0 0 0 26px;
    display: none;
	position: relative;
}


.sb-group.is-open .sb-sub { display: block; }

.sb-sub a {
    font-size: 12.5px;
    opacity: 0.95;
	padding: 8px 12px;
}

/* Unified control radius */
.btn, .btn-secondary,
button,
input, select, textarea {
  border-radius: var(--ctrl-radius);
}

/* Sidebar radius */
.sidebar-menu a,
.sb-parent,
.sb-sub a {
  border-radius: var(--ctrl-radius);
}

/* Apply to all common UI controls */
.btn, .btn-secondary,
button,
input, select, textarea,
.form-control, .form-select,
.card, .alert, .modal-dialog,
.dropdown-menu, .table,
.page-header, .app-header,
.sidebar-menu a, .sb-parent, .sb-sub a {
  border-radius: var(--ctrl-radius) !important;
}

/* keep avatars/chips round where needed */
.hdr-avatar { border-radius: 999px !important; }
.hdr-chip, .hdr-badge { border-radius: 999px !important; }

/* Ensure hover/focus doesn't “round back” from other rules */
.btn:hover, .btn:focus,
button:hover, button:focus,
input:hover, input:focus,
select:hover, select:focus,
textarea:hover, textarea:focus,
.form-control:hover, .form-control:focus,
.form-select:hover, .form-select:focus {
  border-radius: var(--ctrl-radius) !important;
}

.reviews-row-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;            /* <-- distance between buttons */
  flex-wrap:wrap;
}


/* Optional: make selects more “square” across browsers */
select{
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* If your KPIs are .card blocks inside a KPI/grid wrapper */
.status-pill, .notif-status-pill, .hdr-badge, .badge {
  border-radius: var(--ctrl-radius) !important;
}

/* Sidebar submenu sizing + indent (minimal) */
.sb-parent,
.sidebar-menu > li > a{
  font-size: 13px;
}

.sb-sub{
  padding-left: 26px; /* πιο μέσα οι υποκατηγορίες */
}

.sb-sub a{
  font-size: 12px; /* μικρότερο από τις κατηγορίες */
  padding: 8px 12px; /* λίγο πιο tight */
}
