/* ----------------------------------------------------- */
/* RESET & BASE STYLES                                   */
/* ----------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Dark background & fix the phone frame in place (no scroll on desktop) */
body {
    background: #505050;
    margin: 0;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-wrapper {
    width: 100%;
    max-width: 520px;
    height: 96vh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

/* HEADER stays visible */
.app-header {
    position: relative;
    background: #0078d4;
    color: white;
    padding-right: .8rem;
    padding-left: .8rem;
    padding-bottom: .6rem;
}

.app-header .header-inner {
    display: flex;
    align-items: center;
}

/* ONLY content scrolls */
.phone-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.app-header-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.app-header-title a {
    text-decoration: none;
    color: white;
    transition: color 0.3s ease;
}

.app-header-title a:hover {
    color: #505050;
}

/* Navigation */
.app-nav a {
    color: white;
    text-decoration: none;
    margin-left: .5rem;
    font-size: 1rem;
    display: inline-block;
    transition: color 0.3s ease;
}

.app-nav a:hover {
    color: #505050;
}


/* Animated underline */
.app nav a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #4dabf7;
    transition: width 0.3s ease;
}

.app-nav a:hover::after {
    width: 100%;
}


/* ----------------------------------------------------- */
/* THEME OVERRIDES (CATEGORY COLORS)                     */
/* ----------------------------------------------------- */
.theme-blue .app-header {
    background: #0078d4 !important;
    /* Textiel */
}

.theme-green .app-header {
    background: #6B8E23 !important;
    /* Huisraad */
}

.theme-purple .app-header {
    background: #704ba0 !important;
    /* Schoenen */
}


/* ----------------------------------------------------- */
/* PAGE TITLES + PARAGRAPHS                              */
/* ----------------------------------------------------- */
h1 {
    color: white;
    font-weight: 600;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
}

p {
    color: #333;
    font-size: 0.95rem;
}


/* ----------------------------------------------------- */
/* POWERAPPS-STYLE HOMEPAGE CARDS                        */
/* ----------------------------------------------------- */
.cards-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0;
}

.app-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.theme-blue {
    background: #0078d4;
}

.theme-green {
    background: #6B8E23;
}

.theme-purple {
    background: #704ba0;
}

.theme-orange {
    background: #FF8C00;
}

.app-card h2 {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.app-card p {
    color: white;
    opacity: 0.9;
}


/* ----------------------------------------------------- */
/* FLASH MESSAGES                                         */
/* ----------------------------------------------------- */
.flash-container {
    margin-bottom: 1rem;
}

.flash-message {
    padding: 0.5rem 0.8rem;
    margin-bottom: 0.3rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.flash-error {
    background: #ffd6d6;
    color: #7f1d1d;
}


/* ----------------------------------------------------- */
/* LIST HEADER (Toolbar + Search)                         */
/* ----------------------------------------------------- */
.list-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    background-color: #4A5B60;
    padding-left: 1rem;
    padding-right: 1rem;
}

.toolbar {
    display: flex;
    gap: .4rem;
    align-items: center;
}

.toolbar-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    padding: 0;
    margin: 0;
    text-decoration: none;
    line-height: 1;
}


/* ----------------------------------------------------- */
/* SEARCH BAR                                             */
/* ----------------------------------------------------- */
.search-form {
    margin-bottom: 0.6rem;
}

.search-input {
    width: 100%;
    padding: 0.55rem;
    border-radius: 6px;
    border: 1px solid #ccc;
}


/* ----------------------------------------------------- */
/* BRAND LIST (PowerApps style gallery)                   */
/* ----------------------------------------------------- */
.brand-list {
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.brand-row {
    display: grid;
    grid-template-columns: 110px 1fr 40px 20px;
    align-items: center;
    height: 90px;
    padding: 0 0.5rem 0 1rem;
    text-decoration: none;
    color: inherit;
}

.brand-row:hover {
    background: #f7f7f7;
}

.brand-logo {
    width: 110px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.brand-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.brand-logo-placeholder {
    width: 48px;
    height: 40px;
    background: #e5e5e5;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #555;
}

.brand-name {
    text-align: center;
    font-size: 1.3rem;
}

.brand-number {
    text-align: left;
    font-weight: 500;
    font-size: 1.4rem;
}

.brand-arrow {
    text-align: center;
    font-size: 2.5rem;
    opacity: 0.3;
}


/* ----------------------------------------------------- */
/* DETAIL PAGE                                            */
/* ----------------------------------------------------- */
.brand-detail-card {
    margin-top: 0.7rem;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 1rem;
    align-items: center;
}

.brand-detail-logo img {
    max-width: 120px;
    max-height: 80px;
    object-fit: contain;
}


/* ----------------------------------------------------- */
/* FORM                                                   */
/* ----------------------------------------------------- */
.brand-form {
    margin-top: 0.7rem;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.brand-form label {
    font-size: 0.9rem;
}

.brand-form input {
    margin-top: 0.2rem;
    padding: 0.45rem 0.6rem;
    border-radius: 6px;
    border: 1px solid #ccc;
}


/* ----------------------------------------------------- */
/* FORM HEADER (PowerApps style)                          */
/* ----------------------------------------------------- */
.form-header-bar {
    background-color: #2D68C4;
    color: white;
    padding: 0.65rem 0.8rem;
    margin-bottom: 0.4rem;
    display: flex;
    /* important: items on the same row */
    align-items: center;
    /* vertically center them */
    justify-content: space-between;
    /* space between left, title, right */
}

.form-header-title {
    flex: 1;
    /* takes available space */
    text-align: center;
    /* centers text */
    font-size: 1.2rem;
    font-weight: 600;
}

/* ----------------------------------------------------- */
/* UPLOAD BOX (Logo & Attachments)                        */
/* ----------------------------------------------------- */
.upload-box {
    width: 100%;
    height: 140px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0.3rem 0 0.7rem 0;
}

.upload-box:hover {
    background: #f0f0f0;
}

.upload-hint-clickable {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.logo-in-box {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}


/* ----------------------------------------------------- */
/* ATTACHMENTS                                            */
/* ----------------------------------------------------- */
.attachments-section {
    margin-top: 0.8rem;
    padding-top: 0.6rem;
    border-top: 1px solid #ddd;
}

.attachment-list {
    list-style: none;
    margin-bottom: 0.4rem;
}

.attachment-list li {
    margin-bottom: 0.25rem;
}


/* ----------------------------------------------------- */
/* BUTTONS                                                */
/* ----------------------------------------------------- */
.btn-primary,
.btn-secondary,
.btn-danger {
    border: none;
    border-radius: 6px;
    padding: 0.45rem 0.9rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-primary {
    background: #0078d4;
    color: white;
}

.btn-primary:hover {
    font-size: 1.05rem;
}

.btn-secondary {
    background: #e5e5e5;
    color: #333;
}

.btn-danger {
    background: #c53030;
    color: white;
}


/* ----------------------------------------------------- */
/* RESPONSIVE                                              */
/* ----------------------------------------------------- */
@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .app-nav {
        margin-top: 0.4rem;
    }
}

/* On real mobile devices, use full-height layout with normal scrolling */
@media (max-width: 480px) {

    .brand-row {
        padding-left: 1em;
    }

    .brand-name {
        padding-left: 6rem;
    }

    .app-nav a {
        color: white;
        text-decoration: none;
        margin-left: .4rem;
        font-size: 1rem;
    }
}

.header-btn-left,
.header-btn-right {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    /* remove extra button padding */
}

.toolbar-button:hover {
    opacity: 0.7;
}

/* ----------------------------------------------------- */
/* DETAIL PAGE — PERFECT POWERAPPS STYLE                 */
/* ----------------------------------------------------- */

/* HEADER */
.pa-header {
    display: flex;
    align-items: center;
    color: white;
    font-size: 20px;
    align-items: center;
    background: #2F71D5;
    padding: 10px 14px;
    height: 50px;
    font-family: "Segoe UI", sans-serif;
}

.pa-back {
    font-size: 26px;
    margin-right: 15px;
    color: white;
    text-decoration: none;
}

.pa-title {
    flex-grow: 1;
    font-size: 20px;
    font-weight: 600;
}

.pa-actions {
    display: flex;
    gap: 14px;
}

.pa-icon {
    background: none;
    color: white;
    font-size: 22px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
}

.pa-icon.delete {
    color: #ffdddd;
}

.pa-icon.edit {
    color: #ddffdd;
}

/* CONTENT AREA */
.pa-content {
    padding: 20px 25px;
    font-size: 18px;
}

/* LABEL */
.pa-label {
    color: #1e3d8f;
    font-size: 17px;
    margin-left: 5px;
}

/* LOGO */
.pa-logo {
    display: block;
    margin: 15px auto 25px auto;
    width: 240px;
    height: auto;
    max-height: 120px;
    object-fit: contain;
    border-radius: 5px;
}

.pa-logo.placeholder {
    background: #ddd;
    width: 240px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
}

/* FIELDS */
.pa-field {
    margin-top: 25px;
}

.pa-value {
    font-size: 22px;
    margin-left: 5px;
}

/* BUTTON ROW (if needed elsewhere) */
.detail-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 16px;
}

.edit-btn {
    background: #007bff;
    color: white;
}

.delete-btn {
    background: #dc3545;
    color: white;
    border: none;
}

.back-btn {
    background: #ddd;
    color: #333;
}

/* Two-column rows like PowerApps */
.pa-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 25px;
}

.pa-row .pa-label {
    width: 120px;
    /* label width */
    margin: 0;
}

.pa-row .pa-value {
    font-size: 22px;
}

/* ----------------------------------------------------- */
/* POWERAPPS STYLE HEADER                                */
/* ----------------------------------------------------- */

/* Back arrow */
.pa-back {
    text-decoration: none;
    margin-right: 12px;
}

.pa-arrow {
    font-family: "Segoe MDL2 Assets";
    /* Windows icon font */
    font-size: 28px;
    color: white;
}

/* Base for icons */

/* Delete icon - outlined white trash bin */
.pa-icon-delete {
    background-image: url("data:image/svg+xml;utf8,\
    <svg xmlns='http://www.w3.org/2000/svg' stroke='white' fill='none' stroke-width='2' viewBox='0 0 24 24'>\
      <polyline points='3 6 5 6 21 6' />\
      <path d='M19 6l-1 14H6L5 6m3 0V4h8v2'/>\
      <line x1='10' y1='11' x2='10' y2='17' />\
      <line x1='14' y1='11' x2='14' y2='17' />\
    </svg>");
}

button.pa-icon-delete {
    background-position: center -3px;
}

/* Edit icon - outlined white pencil */
.pa-icon-edit {
    background-image: url("data:image/svg+xml;utf8,\
    <svg xmlns='http://www.w3.org/2000/svg' stroke='white' fill='none' stroke-width='2' viewBox='0 0 24 24'>\
      <path d='M12 20h9'/>\
      <path d='M16.5 3.5l4 4L7 21H3v-4L16.5 3.5z'/>\
    </svg>");
}

a.pa-icon-edit {
    background-position: center 2px;
}

.search-input {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 32 32' stroke-width='1.4' stroke='gray'%3E%3Ccircle cx='14' cy='14' r='8'/%3E%3Cline x1='20' y1='20' x2='28' y2='28' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left 10px center;
    background-size: 30px;
    padding-left: 52px;
    padding-right: 35px;
    font-size: 1.5rem;
}

.instructie {
    padding-left: .5rem;
    padding-top: .8rem;
    text-align: center;
}

.highlight-online {
    background-color: #ffe9d6;
    border-left: 4px solid #ff8c42;
}

.alert {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.alert-danger,
.alert-error {
    background-color: #fdecea;
    color: #b71c1c;
    border: 1px solid #f5c6cb;
}

.login-container {
    background: #fff;
    padding: 30px;
    max-width: 400px;
    margin: 60px auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-container h2 {
    margin-bottom: 20px;
    text-align: center;
}

form label {
    display: block;
    margin: 10px 0 5px;
}

form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

form button {
    width: 100%;
    padding: 10px;
    background-color: #3b61cf;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

form button:hover {
    background-color: #2f50aa;
}

.alert,
.flash-message {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.flash-message {
    padding: 10px 14px;
    border-radius: 6px;
    margin: 10px auto;
    max-width: 420px;
    font-weight: bold;
    text-align: center;
    font-size: 16px;

}

.alert-danger,
.flash-error {
    background-color: #fdecea;
    color: #b71c1c;
    border: 1px solid #f5c6cb;
}

form input:focus {
    border-color: #3b61cf;
    box-shadow: 0 0 0 2px rgba(59, 97, 207, 0.2);
    outline: none;
}

.flash-success {
    background-color: #74C476;
    /* green */
    color: #ffffff;
    /* white text */
}

.flash-danger,
.flash-error {
    background-color: #ef9a9a;
    /* red */
    color: #ffffff;
}

.flash-warning {
    background-color: #ffc107;
    /* yellow */
    color: #212529;
    /* dark gray text */
}

.flash-info {
    background-color: #42a5f5;
    /* blue */
    color: #ffffff;
}

.loginText {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding-top: .3rem;
    font-size: 15px;
    transition: color 0.3s ease;
}

/* Hover effect */
.loginText:hover {
    color: #a0a0a0;
}

.loginText:hover::after {
    width: 100%;
}

.logo {
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
    color: #505050;
}

.user-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1;
    color: white;
    font-size: 0.85rem;
}

.loginText:hover {
    color: #505050;
}

/* Username sus dreapta */
.username {
    position: absolute;
    top: 2px;
    right: 12px;
    color: white;
    opacity: 0.9;
    font-size: 0.75rem;
}

/* Main bar */
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px;
    margin-left: -15px;
    min-height: 45px;
}

/* Menu */
.app-nav {
    display: flex;
    gap: 7px;
    align-items: center;
    padding-top: 2px;
}

/* Logo */
.logo {
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.forbidden-actions {
    margin-top: 33px;
    text-align: center;
}

.flash-messages {
    margin: 1rem;
}

.flash.success {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 6px;
}

.flash.error {
    background: #f8d7da;
    color: #721c24;
}

.flash.warning {
    background: #fff3cd;
    color: #856404;
}

@media (max-width: 480px) {
    .app-nav a {
        font-size: 11px;
    }

    .card-text h2 {
        font-size: 15px;
    }

    .card-text p {
        font-size: 14px;
    }

    .instructie {
        font-size: 14px;
    }
}

.user_management_btn {
    text-decoration: none;
    color: white;
    font-size: .8rem;
}

.user_management_btn:hover {
    color: #505050;
}

/* =========================
   ADMIN – USER MANAGEMENT
   ========================= */

.admin-container {
    max-width: 520px;
    margin-top: -28px;
}

/* Headlines */
.admin-container h1 {
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Tabel */
.admin-table {
    border-collapse: collapse;
    background: #ffffff;
}

.admin-table th,
.admin-table td {
    padding: 1rem 0rem;
    border: 1px solid #ddd;
    text-align: center;
    vertical-align: middle;
}

.admin-table th {
    background-color: #f4f6f8;
}

.admin-table tr:nth-child(even) {
    background-color: #fafafa;
}

/* Username column */
.admin-table td:first-child {
    text-align: left;
    font-weight: 500;
}

/* Permissions icons */
.perm-yes {
    color: #198754;
    /* verde */
    font-weight: bold;
}

.perm-no {
    color: #dc3545;
    /* roșu */
    font-weight: bold;
}

/* Buttons */
.admin-btn {
    padding: 0.6rem 0.6rem;
    font-size: 0.85rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.admin-btn-edit {
    background-color: #ffc107;
    color: #000;
}

.admin-btn-delete {
    background-color: #dc3545;
    color: #fff;
}

.admin-btn-new {
    background-color: #047d86;
    color: #fff;
    margin-bottom: 2rem;
    font-size: 1rem;
    font-weight: bold;
    margin-left: .6rem;
}

.admin-btn-new:hover {
    background-color: #0c2c29;
    color: white;
}

/* Form */
.admin-form {
    max-width: 620px;
    background: #fff;
    padding: 1.3rem;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.admin-form .form-group {
    margin-bottom: 1rem;
}

.admin-form label {
    font-weight: 500;
    margin-bottom: 0.3rem;
    display: block;
}

.admin-form input[type="text"],
.admin-form input[type="password"] {
    width: 90%;
    padding: 0.45rem;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.admin-form fieldset {
    border: 1px solid #ddd;
    padding: 1rem;
    border-radius: 4px;
}

.admin-form legend {
    font-size: 0.8rem;
    font-weight: 600;
}

/* Checkbox layout */
.admin-form .form-check {
    margin-bottom: 0.4rem;
}

/* Actions */
.admin-actions {
    margin-top: 1.2rem;
    display: flex;
    gap: 0.5rem;
}

.admin_users {
    margin: 6px;
}

#users_table {
    padding-top: 20px;
}


/* Username + admin badge */
.username-cell {
    text-align: left;
    font-weight: 500;
}

.admin-badge {
    margin-left: 0.3rem;
    padding: 0.15rem 0.4rem;
    font-size: 0.6rem;
    background: #212529;
    color: #fff;
    border-radius: 4px;
}

/* Actions */
.admin-actions-cell {
    white-space: nowrap;
    text-align: center;
}

/* Permission icons */
.perm-yes {
    color: #198754;
    font-weight: bold;
}

.perm-no {
    color: #dc3545;
    font-weight: bold;
}

/* Admin action buttons – same look for <a> and <button> */
.admin-btn-danger {
    background-color: #dc3545;
    color: #ffffff;
    border-radius: 6px;
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
}

/* Hover identic */
.admin-btn-danger:hover {
    background-color: #bb2d3b;
    color: #ffffff;
}


/* Elimină complet stilul de link */
.admin-btn-link:visited,
.admin-btn-link:hover,
.admin-btn-link:active {
    color: #ffffff;
    text-decoration: none;
}

.admin-actions-cell .admin-btn {
    margin: 0 2px;
}

/* ===== ADMIN ACTION BUTTONS ===== */

.admin-btn {
    font-weight: 600;
    font-size: .9rem;
    height: 2.4rem;
}

.admin-btn:hover {
    color: white;
    background-color: #10655C;
    height: 2.4rem;
}

/* Bewerken (edit) */
.admin-btn-edit {
    background-color: #0d6efd;
    /* albastru */
    color: #ffffff;
    border-radius: 6px;
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
}

.admin-btn-edit:hover {
    background-color: #0b5ed7;
    color: #ffffff;
}

/* Verwijderen (delete) */
.admin-btn-danger {
    background-color: #dc3545;
    color: #ffffff;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
}

.admin-btn-danger:hover {
    background-color: #bb2d3b;
    color: #ffffff;
}

/* Link that looks like a button */
.admin-btn-link {
    display: inline-flex;
    text-decoration: none;
    line-height: 1.7rem;
    align-items: center;
    justify-content: center;
}

/* Removes the default link style */
.admin-btn-link:visited,
.admin-btn-link:hover,
.admin-btn-link:active {
    color: #fff;
    text-decoration: none;
}


/* Spacing */
.admin-actions-cell .admin-btn {
    margin: 0 3px;
}

/* Allow horizontal scroll ONLY for admin tables */
.admin-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* smooth scroll on mobile */
}

/* ===== FIX FINAL FOR ADMIN TABLE ===== */
.admin-table {
    border-collapse: collapse;
    background: #ffffff;
    width: 98%;
    margin: 0 auto;
}

.admin-table th {
    font-size: .9rem;
    font-weight: bold;
}

.admin-table td {
    padding-left: 5px;
}

/* Username – FIXED WIDTH */
.admin-table th:nth-child(1),
.admin-table td:nth-child(1) {
    width: 110px;
    max-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* FIX: admin buttons should NOT be full width */
.admin-actions-cell button.admin-btn {
    width: auto !important;
    padding: 0.35rem 0.35rem;
}

.form-admin-user {
    padding: 1.5rem;
}

/* Permissions – perfect alignment */
.permission-item label {
    display: grid;
    grid-template-columns: 20px auto;
    align-items: center;
    column-gap: 0.5rem;
    cursor: pointer;
}

.permission-item input[type="checkbox"] {
    margin: 0;
}

.app-header.theme-blue {
    background: #0078d4;
}

.app-header.theme-green {
    background: #6B8E23;
}

.app-header.theme-purple {
    background: #704ba0;
}


.app-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: inherit;
    color: white;
    padding: 1rem 1.2rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    transition: transform 0.1s ease, box-shadow 0.15s ease;
}

@media (max-width: 480px) {
    .app-card {
        flex-direction: row;
    }
}

.app-card img {
    width: 80px;
    height: 80px;
    margin-left: 0px;
}

.card-text {
    flex: 1;
}

.logo-container {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.logo-box {
    position: relative;
    width: 220px;
    height: 160px;
    border: 2px dashed #ccc;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #fff;
}

.logo-box.empty {
    color: #777;
}

.logo-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-delete-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #2f5da8;
    color: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    }

.logo-delete-btn:hover {
    background: #1e3f78;
}

.upload-hint-clickable{
padding-left: 7px;
}
