﻿html {
  font-size: 14px;
}

:root {
    --app-header-height: 60px;
    --app-footer-height: 32px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus {
  box-shadow: 0 0 0 0.1rem red, 0 0 0 0.25rem darkred;
}

.form-control:focus,
input.form-control:focus,
textarea.form-control:focus,
select.form-control:focus,
.form-select:focus,
select.form-select:focus {
    background-color: #1f242b !important;
    color: #f3ead8 !important;
    -webkit-text-fill-color: #f3ead8 !important;
    caret-color: #f3ead8 !important;
    border-color: #22d3ee !important;
    box-shadow: 0 0 0 0.1rem rgba(34, 211, 238, 0.22), 0 0 0 0.25rem rgba(34, 211, 238, 0.14) !important;
}

.form-check-input:focus {
    border-color: #22d3ee !important;
    box-shadow: 0 0 0 0.1rem rgba(34, 211, 238, 0.22), 0 0 0 0.25rem rgba(34, 211, 238, 0.14) !important;
}

input.form-control:-webkit-autofill,
input.form-control:-webkit-autofill:hover,
input.form-control:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #1f242b inset !important;
    -webkit-text-fill-color: #f3ead8 !important;
    caret-color: #f3ead8 !important;
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none !important;
}

input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-caps-lock-indicator {
    filter: invert(92%) sepia(13%) saturate(377%) hue-rotate(342deg) brightness(107%) contrast(94%);
}

.password-reveal-container {
    position: relative;
}

.password-reveal-container input[type="password"],
.password-reveal-container input[type="text"].password-reveal-input {
    padding-right: 3rem !important;
}

.password-reveal-toggle {
    position: absolute;
    right: 1.05rem;
    width: 1.8rem;
    height: 1.8rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(243, 234, 216, 0.82);
    opacity: 0;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: none;
    z-index: 4;
    transition: opacity 0.12s ease, color 0.12s ease;
}

.password-reveal-toggle.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.password-reveal-toggle:hover,
.password-reveal-toggle:focus {
    color: #ffffff;
    outline: none;
}

.password-reveal-toggle svg {
    width: 1.55rem;
    height: 1.16rem;
    display: block;
    stroke: currentColor;
}

.header-brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: var(--app-header-height);
    padding-left: 22px;
}

.header-brand-icon {
    width: 46px;
    height: auto;
    display: block;
}

.header-brand-icon-shell {
    display: inline-flex;
    flex: 0 0 auto;
}

.header-brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1;
    color: #f3ead8;
    transform: scaleX(0.8);
    transform-origin: left center;
}

.header-brand-name {
    font-family: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.05rem;
}

.header-brand-subtitle {
    margin-top: 3px;
    font-family: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    color: rgba(243, 234, 216, 0.88);
}

html {
  position: relative;
  min-height: 100%;
}

body {
    margin: 0;
    background: radial-gradient(circle at top right, rgba(13, 202, 240, 0.08), transparent 30%), linear-gradient(180deg, rgba(38, 44, 51, 0.96), rgba(24, 29, 34, 0.98));
    overflow: hidden;
    height: var(--tentoset-viewport-height, 100dvh);
    min-height: var(--tentoset-viewport-height, 100dvh);
    display: grid;
    grid-template-rows: var(--app-header-height) minmax(0, 1fr) var(--app-footer-height);
    width: 100%;
    max-width: 100%;
}



.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}



.btn-custom-hover:hover,
.btn-custom-hover:focus,
.btn-custom-hover:active {
    color: red !important;
    background: black !important;
    border-color: red !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Βασικό sidebar */
/* Αρχικό πλάτος */
#dashboard {
    width: 280px !important;
    min-width: 280px !important;
    transition: width 0.3s ease-in-out, min-width 0.3s ease-in-out !important;
    overflow: hidden;
    position: relative;
}

    /* Η κλάση που ενεργοποιεί το μάζεμα */
    #dashboard.collapsed,
    .dashboard-state-collapsed #dashboard {
        width: 20px !important;
        min-width: 20px !important;
    }

        /* Κρύβει τα κείμενα μέσα στα links όταν κλείνει */
        #dashboard.collapsed .nav-link,
        #dashboard.collapsed h7,
        #dashboard.collapsed .sub-menu,
        .dashboard-state-collapsed #dashboard .nav-link,
        .dashboard-state-collapsed #dashboard h7,
        .dashboard-state-collapsed #dashboard .sub-menu {
            display: none !important;
        }

/* Η κάθετη λωρίδα (λαβή) */
.sidebar-handle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    height: 100%;
    width: 16px; /* Πιο κομψή */
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 1px solid rgba(255,255,255,0.1);
    z-index: 2;
}

    .sidebar-handle:hover {
        background: rgba(255, 255, 255, 0.15);
        width: 20px; /* Μεγαλώνει ελάχιστα στο hover για ευκολία */
    }

.main-content {
    flex-grow: 1;
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 0;
    padding: 0 !important;
    margin: 0 !important;
    background: #f8f9fa;
    overflow: auto;
}

#head {
    position: sticky;
    top: 0;
    z-index: 1100;
    height: var(--app-header-height);
    min-height: var(--app-header-height);
}

.admin-layout {
    display: flex;
    align-items: flex-start;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

#dashboard {
    height: 100% !important;
    overflow: hidden;
}

.dashboard-scroll-content {
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

/* Fixed parent/category heading shared by subcategory and component cards. */
.card-category-bar {
    display: flex !important;
    align-items: center;
    justify-content: center;
    align-self: center;
    flex: 0 0 auto;
    box-sizing: border-box;
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
    min-height: 32px;
    margin: 10px 12px 8px !important;
    padding: 6px 10px !important;
    overflow: hidden;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
    line-height: 1.15;
    text-align: center;
    font-size: 0.72rem;
}

.comp-card-head > .card-category-bar {
    margin-top: 0 !important;
}

/* Stable level-1 subcategory card layout.  Header, title, image and actions
   stay fixed; only the descriptive copy scrolls inside the card. */
#subcategoryContainer > [data-id] > .card {
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box;
    width: 300px !important;
    height: 540px !important;
    max-height: 540px !important;
    overflow: hidden !important;
}

#subcategoryContainer > [data-id] > .card > .card-category-bar {
    height: 42px;
    min-height: 42px;
    max-height: 42px;
}

#subcategoryContainer > [data-id] > .card > .card-drag-region {
    flex: 0 0 auto;
    min-height: 0;
    overflow: hidden;
}

#subcategoryContainer > [data-id] > .card .card-title {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 64px;
    width: calc(100% - 24px);
    height: 64px;
    min-height: 64px;
    max-height: 64px;
    margin: 0 12px 8px;
    padding: 4px;
    overflow-x: hidden;
    overflow-y: auto;
    overflow-wrap: anywhere;
    line-height: 1.15;
}

#subcategoryContainer > [data-id] > .card .list-card-image {
    display: block;
    flex: 0 0 170px;
    width: calc(100% - 24px) !important;
    max-width: 276px !important;
    height: 170px !important;
    min-height: 170px !important;
    max-height: 170px !important;
    margin: 0 12px;
    object-fit: contain !important;
    align-self: center;
}

#subcategoryContainer > [data-id] > .card > .card-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    margin: 0;
    padding: 10px 14px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

#subcategoryContainer > [data-id] > .card > .card-body > :last-child {
    margin-bottom: 0;
}

#subcategoryContainer > [data-id] > .card > a.card-action-btn,
#subcategoryContainer > [data-id] > .card > form {
    flex: 0 0 auto;
}

#subcategoryContainer > [data-id] > .card > form {
    width: 100%;
    margin: 0;
    padding: 0;
}

#subcategoryContainer > [data-id] > .card .card-action-btn {
    box-sizing: border-box;
}

footer.footer {
    height: var(--app-footer-height);
    min-height: var(--app-footer-height);
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, rgba(13, 202, 240, 0.08), transparent 30%), linear-gradient(180deg, rgba(38, 44, 51, 0.96), rgba(24, 29, 34, 0.98)) !important;
    color: rgba(250, 235, 215, 0.78) !important;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.8rem;
    padding: 0 12px;
    box-shadow: 0 -1px 0 rgba(255,255,255,0.04);
}


footer.footer .container {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    text-align: center;
    color: inherit !important;
}

footer.footer a {
    color: #8fdfff !important;
    text-decoration: none;
}

#categoryContainer > [data-id] > .card,
#subcategoryContainer > [data-id] > .card,
#subcategory2Container > [data-id] > .card,
#componentContainer .comp-card {
    background: linear-gradient(160deg, rgba(35, 43, 51, 0.98), rgba(22, 27, 33, 0.98)) !important;
    border-color: rgba(143, 233, 255, 0.22) !important;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32) !important;
    color: antiquewhite !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

#categoryContainer > [data-id] > .card:focus,
#categoryContainer > [data-id] > .card:focus-within,
#subcategoryContainer > [data-id] > .card:focus,
#subcategoryContainer > [data-id] > .card:focus-within,
#subcategory2Container > [data-id] > .card:focus,
#subcategory2Container > [data-id] > .card:focus-within,
#componentContainer .comp-card:focus,
#componentContainer .comp-card:focus-within {
    border-color: #00d2ff !important;
    box-shadow: 0 0 0 2px rgba(0, 210, 255, 0.42), 0 18px 34px rgba(0, 0, 0, 0.42) !important;
    outline: none !important;
}

#categoryContainer .card-title,
#subcategoryContainer .card-title,
#subcategory2Container .card-title,
#componentContainer .comp-card h5,
#componentContainer .comp-card h6 {
    color: antiquewhite !important;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.78);
}

#categoryContainer .text-muted,
#subcategoryContainer .text-muted,
#subcategory2Container .text-muted,
#categoryContainer .card-text,
#subcategoryContainer .card-text,
#subcategory2Container .card-text {
    color: rgba(250, 235, 215, 0.82) !important;
}

#categoryContainer .category-card-image,
#subcategoryContainer .list-card-image,
#subcategory2Container .list-card-image,
#componentContainer .comp-card-image,
#componentContainer .product-image-frame {
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
}

#categoryContainer .category-card-image,
#subcategoryContainer .list-card-image,
#subcategory2Container .list-card-image {
    border-radius: 0 !important;
}

#componentContainer .comp-card > div:last-child {
    background: transparent !important;
    border-top-color: rgba(143, 233, 255, 0.14) !important;
}

#categoryContainer .card-body,
#subcategoryContainer .card-body,
#subcategory2Container .card-body,
#categoryContainer .card > form,
#subcategoryContainer .card > form,
#subcategory2Container .card > form {
    background: transparent !important;
}

#categoryContainer .card,
#subcategoryContainer .card,
#subcategory2Container .card {
    --bs-card-bg: transparent;
}

#componentContainer .comp-card .dynamic-values-container,
#componentContainer .comp-card .details-box,
#componentContainer .comp-card .description-box {
    background: rgba(20, 25, 31, 0.94) !important;
    border-color: rgba(143, 233, 255, 0.22) !important;
    color: antiquewhite !important;
    box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.24);
}

#componentContainer .comp-card .dynamic-values-container h6,
#componentContainer .comp-card .dynamic-values-container strong,
#componentContainer .comp-card .dynamic-values-container span,
#componentContainer .comp-card .dynamic-values-container .small,
#componentContainer .comp-card .description-title,
#componentContainer .comp-card .description-scroll,
#componentContainer .comp-card .details-box,
#componentContainer .comp-card .details-box strong,
#componentContainer .comp-card .details-box span {
    color: antiquewhite !important;
    text-shadow: none !important;
}

#componentContainer .comp-card .dynamic-row,
#componentContainer .comp-card .description-title {
    border-bottom-color: rgba(143, 233, 255, 0.14) !important;
}

#componentContainer .comp-card .dynamic-values-container strong {
    color: #8fe9ff !important;
}

#cardTab form[method="get"] .form-label,
#cardTab form[method="get"] label {
    color: #dff8ff !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.55);
}

#cardTab form[method="get"] .form-select,
#cardTab form[method="get"] .form-control {
    background-color: #1f242b !important;
    color: antiquewhite !important;
    border: 1px solid rgba(143, 233, 255, 0.34) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

#cardTab form[method="get"] .form-select:focus,
#cardTab form[method="get"] .form-control:focus {
    background-color: #202832 !important;
    color: #f2fbff !important;
    border-color: #00d2ff !important;
    box-shadow: 0 0 0 0.16rem rgba(0, 210, 255, 0.18) !important;
}

#cardTab form[method="get"] .form-select option {
    background: #1f242b;
    color: antiquewhite;
}

#cardTab form[method="get"] .btn-outline-secondary {
    color: rgba(223, 248, 255, 0.74) !important;
    border-color: rgba(143, 233, 255, 0.34) !important;
    background: rgba(31, 36, 43, 0.84) !important;
}

@media (max-width: 991.98px), (max-height: 700px) {
    .main-content {
        overflow-y: auto !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .order-page-shell {
        height: auto !important;
        min-height: calc(100dvh - var(--app-header-height) - var(--app-footer-height)) !important;
        overflow: visible !important;
        padding-bottom: calc(var(--app-footer-height) + 1rem) !important;
    }

    .order-page-grid {
        min-height: auto !important;
    }

    .order-library-panel,
    .order-table-panel {
        min-height: 0 !important;
    }
}

/* Η κύλιση της σελίδας γίνεται από το main-content σε κινητό/tablet portrait. */
@media (orientation: portrait) and (max-width: 1199.98px) {
    .main-content {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        overscroll-behavior-y: auto;
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
    }

    .order-page-shell {
        display: block !important;
        height: auto !important;
        min-height: calc(100dvh - var(--app-header-height) - var(--app-footer-height)) !important;
        overflow: visible !important;
        touch-action: pan-y;
    }

    .order-page-grid {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }
}

/* Κοινή προσαρμογή tablet/κινητού για όλες τις σελίδες του βασικού layout. */
@media (max-width: 1199.98px) {
    .admin-layout {
        position: relative;
        align-items: stretch;
        height: 100% !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    #dashboard {
        position: absolute !important;
        inset: 0 auto 0 0;
        z-index: 1085;
        width: min(86vw, 300px) !important;
        min-width: min(86vw, 300px) !important;
        max-width: 300px;
        box-shadow: 14px 0 34px rgba(0, 0, 0, 0.45);
        height: 100% !important;
        min-height: 0 !important;
        overflow-x: hidden !important;
        overflow-y: hidden !important;
    }

    #dashboard.collapsed,
    .dashboard-state-collapsed #dashboard {
        width: 20px !important;
        min-width: 20px !important;
        box-shadow: none;
    }

    .main-content {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding-left: 20px !important;
        height: 100% !important;
        min-height: 0 !important;
        overflow-x: auto !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        touch-action: pan-x pan-y;
        -webkit-overflow-scrolling: touch;
    }

    .main-content > * {
        max-width: 100%;
    }

    .main-content img,
    .main-content video,
    .main-content canvas,
    .main-content svg {
        max-width: 100%;
    }
}

@media (max-width: 767.98px),
       (max-width: 1024px) and (pointer: coarse) {
    :root {
        --app-header-height: 54px;
        --app-footer-height: 28px;
    }

    html {
        font-size: 14px;
    }

    #head {
        padding: 0 8px;
        gap: 6px;
    }

    .header-brand {
        height: var(--app-header-height);
        padding-left: 0;
        gap: 3px;
    }

    .header-brand-icon {
        width: 38px;
    }

    #main-head {
        display: none;
    }

    .header-brand-text {
        display: flex;
        flex: 0 0 auto;
        transform: none;
        line-height: 0.92;
    }

    .header-brand-name {
        font-size: 1.08rem;
        letter-spacing: 0.025rem;
    }

    .header-brand-subtitle {
        margin-top: 2px;
        font-size: 0.52rem;
    }

    #login,
    #headbar,
    #login .navbar-nav {
        min-width: 0;
    }

    #headbar .nav-item {
        margin-left: 0 !important;
    }

    #headbar .navbar-nav,
    #login .navbar-nav {
        gap: 8px !important;
    }

    #headbar .nav-link {
        max-width: 42vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.82rem;
    }

    footer.footer {
        font-size: 0.68rem;
        white-space: normal;
        line-height: 1.1;
    }
}

html,
body,
body *
{
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
body *::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.pricelist-page,
.pricelist-page *,
.lighting-pricelist-page,
.lighting-pricelist-page *,
.bio-light-page,
.bio-light-page *,
.shelter-pricelist-page,
.shelter-pricelist-page *,
.sidebeam-pricelist-page,
.sidebeam-pricelist-page *,
.column-pricelist-page,
.column-pricelist-page *,
.triangle-pricelist-page,
.triangle-pricelist-page *,
.tentoset-price-page,
.tentoset-price-page * {
    font-weight: 400 !important;
}
.role-menu-configuration-error {
    margin: 12px;
    padding: 14px;
    border: 1px solid rgba(255, 208, 77, .45);
    border-radius: 12px;
    background: rgba(255, 208, 77, .1);
    color: antiquewhite;
    line-height: 1.45;
}

html[data-theme="light"] .role-menu-configuration-error {
    border-color: rgba(133, 91, 0, .35);
    background: rgba(255, 208, 77, .18);
    color: #493700;
}
