/* #region Global */
* {
    font-family: 'Work Sans';
}

:root {
    --ui-primary: #4f46e5;
    --ui-primary-hover: #4338ca;
    --ui-secondary: #e5e7eb;
    --ui-secondary-hover: #d1d5db;
    --ui-text-dark: #0f172a;
    --ui-text-light: #ffffff;
    --ui-border: #e2e8f0;
    --ui-shadow: 0 0.25rem 1.5rem rgba(15, 23, 42, 0.08);
    --ui-radius: 0.5rem;
    --ui-toggle-off: #94a3b8;
    --ui-toggle-on: #10b981;
    --ui-danger: #dc2626;
}

.work-sans-thin {
  font-family: "Work Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 100;
  font-style: normal;
}

.work-sans-light {
  font-family: "Work Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 300;
  font-style: normal;
}

.work-sans-regular {
  font-family: "Work Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

.work-sans-medium {
  font-family: "Work Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
}

.work-sans-semibold {
  font-family: "Work Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
}

.work-sans-bold {
  font-family: "Work Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 700;
  font-style: normal;
}

.work-sans-extrabold {
  font-family: "Work Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 800;
  font-style: normal;
}

.work-sans-black {
  font-family: "Work Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 900;
  font-style: normal;
}

/* #region UI Components */
.btn,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--ui-radius);
    border: 0.1rem solid transparent;
    background: #f3f4f6;
    color: var(--ui-text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.btn.btn-main,
.button.submit,
.button.addnew {
    background: var(--ui-primary);
    color: var(--ui-text-light);
    border-color: transparent;
    box-shadow: var(--ui-shadow);
}

.btn.btn-main:hover,
.button.submit:hover,
.button.addnew:hover {
    background: var(--ui-primary-hover);
    color: var(--ui-text-light);
}

.btn.btn-secondary,
.button.cancel {
    background: var(--ui-secondary);
    color: var(--ui-text-dark);
    border-color: var(--ui-border);
    box-shadow: none;
}

.btn.btn-secondary:hover,
.button.cancel:hover {
    background: var(--ui-secondary-hover);
}

.btn.btn-danger {
    background: var(--ui-danger);
    border-color: var(--ui-danger);
    color: #fff;
}

.btn.btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

.btn.btn-icon,
.button.icon-button {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border-radius: 0.4rem;
    background: #f8fafc;
    border: 0.1rem solid var(--ui-border);
    color: var(--ui-text-dark);
    font-size: 0.95rem;
}

.btn.btn-icon:hover,
.button.icon-button:hover {
    background: #e2e8f0;
}

.btn.btn-toggle,
.button.toggle-button {
    min-width: 5.5rem;
    border-radius: 999rem;
    border: 0.1rem solid var(--ui-toggle-off);
    background: transparent;
    color: var(--ui-toggle-off);
}

.btn.btn-toggle.is-active,
.button.toggle-button.active {
    background: var(--ui-toggle-on);
    border-color: var(--ui-toggle-on);
    color: #fff;
}

.table-main,
.management-table,
.list-table,
.structure-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--ui-radius);
    overflow: hidden;
    box-shadow: var(--ui-shadow);
}

.table-main thead th,
.management-table thead th,
.list-table thead th,
.structure-table thead th {
    background: #f8fafc;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: #475569;
    border-bottom: 0.1rem solid var(--ui-border);
}

.table-main th,
.table-main td,
.management-table th,
.management-table td,
.list-table th,
.list-table td,
.structure-table th,
.structure-table td {
    padding: 0.85rem 1rem;
    border-bottom: 0.05rem solid var(--ui-border);
}

.table-main tbody tr:hover,
.management-table tbody tr:hover,
.list-table tbody tr:hover,
.structure-table tbody tr:hover {
    background: #f8fafc;
}

.dropdown,
select.dropdown {
    width: 100%;
    padding: 0.65rem 1rem;
    border-radius: var(--ui-radius);
    border: 0.1rem solid var(--ui-border);
    background: #fff;
    font-weight: 500;
    color: #0f172a;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dropdown:focus,
select.dropdown:focus {
    outline: none;
    border-color: var(--ui-primary);
    box-shadow: 0 0 0 0.15rem rgba(79, 70, 229, 0.15);
}

.input-control {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: var(--ui-radius);
    border: 0.1rem solid var(--ui-border);
    font-size: 1rem;
    background: #fff;
    color: var(--ui-text-dark);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-control:focus {
    outline: none;
    border-color: var(--ui-primary);
    box-shadow: 0 0 0 0.15rem rgba(79, 70, 229, 0.15);
}

textarea.input-control {
    min-height: 8rem;
    resize: vertical;
}

.modal,
.popup {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    z-index: 1000;
    padding: 1.5rem;
}

.modal.visible,
.popup.visible {
    display: flex;
}

.modal .modal-inner,
.popup .inner {
    background: #fff;
    border-radius: 1rem;
    width: min(90vw, 48rem);
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    box-shadow: 0 1.5rem 3rem rgba(15, 23, 42, 0.2);
}

.modal.confirm .modal-inner,
.popup.confirm .inner {
    max-width: 26rem;
}
/* #endregion */

input.error {
    border: 2px solid #ff6666 !important;
}

h1 {
    color:#323233;
    font-size:3rem;
    padding-left:3rem;
    padding-bottom:1rem;
    margin-top:2rem;
    position:relative;
    font-weight:600;
    display:table;
    margin-left:30rem;
}

h1:before {
    content:'';
    position:absolute;
    bottom:0;
    left:0;
    width:100%;
    height:3px;
    background-color:#323233;
}

/* #endregion */

/* #region Page: Page Manager */
.page-manager {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 2rem;
}

.page-manager-container {
    max-width: 75rem;
    margin: 0 auto;
}

.page-manager-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.page-manager-header h2 {
    margin: 0;
    color: #333;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.management-section {
    margin-bottom: 3rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.section-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: 0;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.management-table-container {
    overflow-x: auto;
}

.management-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    table-layout: fixed;
}

.management-table th {
    background: #f8f9fa;
    border-bottom: 0.125rem solid #dee2e6;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #495057;
}

.management-table td {
    padding: 0.75rem;
    border-bottom: 0.0625rem solid #dee2e6;
    vertical-align: middle;
}

/* Zebra rows (standardized for lists/tables) */
.management-table.zebra tbody tr:nth-child(odd) {
    background-color: #ffffff;
}
.management-table.zebra tbody tr:nth-child(even) {
    background-color: #f7f7f7;
}

/* Let title flex; fix others for cross-table consistency */
.management-table .col-title { width: auto; }
.management-table .col-link { width: 10rem; text-align: center; }
.management-table .col-type { width: 5rem; text-align: center; }
.management-table .col-hidden { width: 5.625rem; text-align: center; }
.management-table .col-live { width: 5.625rem; text-align: center; }
.management-table .col-actions { width: 13.75rem; text-align: center; }
.management-table th.col-link,
.management-table th.col-type,
.management-table th.col-hidden,
.management-table th.col-live,
.management-table th.col-actions { text-align: center; }
.management-table .actions { justify-content: center; }

.management-table tr:hover {
    background: #f8f9fa;
}

.editable .editable-text {
    display: inline-block;
    min-width: 60px;
    border-bottom: 1px dashed transparent;
}

.editable.editing .editable-text {
    border-bottom: 1px dashed #80bdff;
}

.toggle-button {
    min-width: 3rem;
}

.toggle-button.active {
    background: #198754;
}

.toggle-button.off { background: #6c757d; }

/* Live column: keep green background when active, text white */
.management-table .col-live .toggle-button.active {
    color: #ffffff;
}

/* Hidden column: invert colors (visible=green, hidden=grey) */
.management-table .col-hidden .toggle-button.active { /* hidden = 1 */
    background: #6c757d;
    color: inherit;
}
.management-table .col-hidden .toggle-button.off { /* hidden = 0 (visible) */
    background: #198754;
    color: #ffffff; /* white icon on green */
}

.management-table .no-data td {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 2rem;
}

/* Pending updates */
#pendingUpdatesSection .pending-content { padding: 1rem 1.5rem; }
#pendingUpdatesSection .pending-list { margin: 0 0 1rem 0; padding-left: 1.25rem; }

.actions { white-space: nowrap; }
.actions .button { padding: 0.25rem 0.5rem; font-size: 0.8rem; min-width: auto; }

/* Category action bar */
.section-title.flex.between { display:flex; justify-content: space-between; align-items:center; }
.cat-actions .button { padding: 0.25rem 0.5rem; margin-left: .25rem; }
.move-category-select { padding: 0.25rem 0.5rem; font-size: .85rem; }

@media (max-width: 768px) {
    .page-manager { padding: 1rem; }
    .page-manager-header { flex-direction: column; gap: 1rem; align-items: stretch; }
    .header-actions { justify-content: center; }
    .management-table { font-size: 0.8rem; }
    .management-table th,
    .management-table td { padding: 0.5rem 0.25rem; }
}
/* #endregion */

/* #region Page: News Admin */
.news-admin .filters .input { min-width: 16rem; }
.news-admin .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.news-admin .small { font-size: 0.9rem; }
.status-badge { display:inline-flex; align-items:center; gap:0.4rem; padding:0.25rem 0.5rem; border-radius:0.4rem; font-weight:600; font-size:0.9rem; }
.status-unconfirmed { background:#fff3f3; color:#b40000; border:0.0625rem solid #f3bcbc; }
.status-ready { background:#fffaf0; color:#8a5a00; border:0.0625rem solid #f2d28a; }
.status-sent { background:#eefae9; color:#146200; border:0.0625rem solid #a9d7a1; }
.status-tip { position:relative; }
.status-tip:hover::after { content:attr(data-tip); position:absolute; left:0; top:120%; background:#222; color:#fff; padding:0.4rem 0.6rem; border-radius:0.4rem; white-space:nowrap; font-size:0.85rem; }
.actions .icon { width:1.1rem; height:1.1rem; display:inline-block; vertical-align:middle; }
/* Apply section-title gradient styling to the news table header */
.management-table.news thead tr {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.management-table.news thead th {
    background: transparent;
    color: #ffffff;
    border-bottom: none;
}
/* #endregion */

/* #region Page: Login */
.login {
    background-image: url('images/bg_login.jpg');
    background-size: cover;
    background-position: top right;
    overflow: hidden;
    position: relative;
}

.login .under {
    background-image: url('images/bg_login_over.png');
    background-size: auto 100vh;
    background-position: top right;
    background-repeat: no-repeat;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    position: absolute;
    transition: height 0.5s ease-in-out;
}

.login .underanim {
    height: 0;
}

.login .container {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    position: relative;
}

.login .container .logo {
    height: 180px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.login .container form input {
    width: 100%;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 400;
}

.login .container form input::placeholder {
    color: #999;
    opacity: 0.7;
    font-weight: 300;
}

.login .container form button {
    width: 100%;
    padding: 1rem;
    border-radius: 0.5rem;
    border: none;
    background: linear-gradient(45deg, #b342e6, #8a33e8);
    color: white;
    cursor: pointer;
    font-weight: 400;
    font-size: 1.2rem;
}

.login .container form button span {
    transition: all 0.2s ease-in-out;
    display: block;
    opacity: 0.75;
}

.login .container form button:hover span {
    opacity: 1;
}

.login .subfooter {
    padding-bottom: 1rem;
    transition: all 0.5s ease-in-out;
}

.login .subanim {
    opacity: 0;
    transform: translateY(2rem);
}

.login .subfooter img {
    height: 15px;
    margin-left: 3px;
}

.login .subfooter .jrx span {
    margin-bottom: 5px;
}

.login .subfooter .links a {
    color: #222;
}

.login .subfooter .links a:first-child {
    margin-right: 2rem;
}

.login .subfooter .links a:hover {
    color: #8a33e8;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.login .container.shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}


/* #endregion */

/* #region Page: Dashboard */

.dashboard {
    background-color:#f6f7fb;
}

.dashboard .mainbar {
    position:fixed;
    z-index:2;
    background-image: url('images/bg_login.jpg');
    background-size: cover;
    background-position: center center;
    height:100vh;
    width:30rem;
    padding-bottom:1rem;
    box-shadow: 50px 0 50px rgba(0,0,0,0.1);
}

.dashboard .mainbar .logo {
    padding-top:2rem;
    padding-bottom:2rem;
    display:block;
}

.dashboard .mainbar .logo img {
    display: block;
    width: 15rem;
    margin-left: auto;
    margin-right: auto;
}

/* Logged-in account badge under logo */
.dashboard .mainbar .account-badge {
    width: 26rem;
    margin: 0 2rem 1rem 2rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
    color: #101928;
}

.dashboard .mainbar .account-badge .label {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 0.25rem;
}

.dashboard .mainbar .account-badge .company-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #101928;
}

.dashboard .mainbar .account-badge .company-url {
    display: inline-block;
    margin-top: 0.25rem;
    font-size: 0.95rem;
    color: #5b2bd7;
    text-decoration: none;
}

.dashboard .mainbar .account-badge .company-url:hover {
    text-decoration: underline;
}

.dashboard .mainbar nav:hover a {
    opacity:0.5;
}

.dashboard .mainbar nav a {
    color:#101928;
    width:30rem;
    padding:0 2rem 0.2rem;
    font-size:1.25rem;
}

.dashboard .mainbar nav a:hover {
    opacity:1;
}

.dashboard .mainbar nav a span {
    color:#101928;
    display:block;
    font-size:2.5rem;
    font-weight:400;
    position: relative;
    top:-0.4rem;
}

.dashboard .mainbar nav a:hover span {
    transform:translateX(1rem);
}

.dashboard .mainbar nav a:not(:last-of-type) {
    border-bottom: 1px solid rgba(16, 25, 40, 0.15);
}

.dashboard .mainbar nav a.active {
    background: linear-gradient(to right, #ad3fde, #8932e5);
    color:#fff;
    opacity:1 !important;
}

.dashboard .mainbar nav a.active span {
    color:#fff;
    transform:rotate(180deg) translateX(1rem);
    top:0.6rem;
    opacity:1 !important;
}

/* Media Management Submenu Styles */
.dashboard .mainbar nav .nav-item {
    position: relative;
}

.dashboard .mainbar nav .nav-item .media-toggle,
.dashboard .mainbar nav .nav-item .website-toggle {
    position: relative;
}

.dashboard .mainbar nav .nav-item .media-toggle.active,
.dashboard .mainbar nav .nav-item .website-toggle.active {
    background: #1a1f2e;
    color: #fff;
    border-bottom: none;
}

.dashboard .mainbar nav .nav-item .media-toggle.active span,
.dashboard .mainbar nav .nav-item .website-toggle.active span {
    color: #fff;
    transform: rotate(90deg) translateX(-0.35rem);
    opacity: 1;
}

.dashboard .mainbar nav .nav-item:hover .media-toggle.active,
.dashboard .mainbar nav .nav-item:hover .website-toggle.active {
    opacity: 1;
}

/* Add specific style for when submenu item is active */
.dashboard .mainbar nav .nav-item.has-active-child .media-toggle,
.dashboard .mainbar nav .nav-item.has-active-child .website-toggle {
    background: linear-gradient(to right, #ad3fde, #8932e5);
    color: #fff;
    opacity:1 !important;
}

.dashboard .mainbar nav .nav-item.has-active-child .media-toggle span,
.dashboard .mainbar nav .nav-item.has-active-child .website-toggle span {
    color: #fff;
    opacity: 1;
}

.dashboard .mainbar nav .submenu {
    display: none;
    background: #1a1f2e;
    overflow: hidden;
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard .mainbar nav .submenu a {
    padding: 0.6rem 3rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dashboard .mainbar nav .submenu a:last-child {
    border-bottom: none;
}

.dashboard .mainbar nav .submenu a span {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.dashboard .mainbar nav .submenu a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.dashboard .mainbar nav .submenu a:hover span {
    color: rgba(255, 255, 255, 0.8);
}

.dashboard .mainbar nav .submenu a.active {
    background: linear-gradient(to right, #ad3fde, #8932e5);
    color: #fff;
}

.dashboard .mainbar nav .submenu a.active span {
    color: #fff;
}

.dashboard .mainbar .poweredby {
    font-size:1rem;
    color:#101928;
}

.dashboard .mainbar .poweredby img {
    height:1.5rem;
    margin-left:0.5rem;
    transform:translateY(0.2rem);
}

.dashboard .mainscreen {
    min-height:100vh;
}

/* #endregion */

/* #region Dashboard Content */
.dashboard .content {
    padding:2rem;
    max-width:1200px;
    margin-left:30rem;
}

.dashboard .content .maintop .button {
    padding:0.5rem 1rem;
    border-radius:0.5rem;
    font-size:1.2rem;
    font-weight:600;    
    cursor:pointer;
}

.dashboard .content .maintop .button.selector {
    border:2px solid #222;
    color:#222;
    opacity:0.25;
}

.dashboard .content .maintop .button.selector:hover {
    opacity:1;
}

.dashboard .content .maintop .button.active {
    background-color:#222;
    color:#fff;
    opacity:1;
    pointer-events:none;
}

.dashboard .content .maintop .button.addnew {
    background-color:#4CAF50;
    color:#fff;
}

.dashboard .content .main {
    background-color:#fff;
    box-shadow: 0 3px 3px rgba(0, 0, 0, 0.1);
    border-radius:0.5rem;
    overflow:hidden;
}

.dashboard .content .main .itemlist .itemtop {
    background-color:#101928;
    color:#fff;
}   

.dashboard .content .main .itemlist .item:not(:last-of-type) {
    border-bottom:1px solid rgba(16, 25, 40, 0.15);
}

.dashboard .content .main .itemlist .item div:not(:first-of-type) {
    text-align:center;
}

.dashboard .content .main .itemlist .item div:not(:last-of-type) {
    width:20%;
}

.dashboard .content .main .itemlist .item div:last-of-type {
    width:10%;
}

.dashboard .content .main .itemlist .item div {
    position:relative;
    padding:0.5rem 1rem;
    flex-grow:1;
}

.dashboard .content .main .actions .button {
    padding:0.5rem;
    color:#999;
    border-radius:0.5rem;
    border:1px solid #999;
}

.dashboard .content .main .itemlist .item .updated .fa-solid {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #ff4444;
    cursor: help;
}

.dashboard .content .main .itemlist .item .updated .fa-solid:before {
    content: "This page has pending updates";
    font-family:Mundial;
    position: absolute;
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 5px;
    pointer-events: none;
}

.dashboard .content .main .itemlist .item .updated .fa-solid:hover:before {
    visibility: visible;
    opacity: 1;
}

.dashboard .content .main .itemlist .subtitle {
    font-size:1rem;
    color:#999;
    font-weight:400;
    display:block;
    line-height:1;
    text-transform:uppercase;
}

.dashboard .content .main .itemlist .title {
    font-size:1.5rem;
    color:#323233;
    font-weight:600;
    display:block;
    line-height:1;
}

.dashboard .content .main .itemlist .item .status {
    font-size:0.8rem;
    color:#fff;
    padding:0.2rem 0.5rem;
    border-radius:0.5rem;
}

.dashboard .content .main .itemlist .item .status.live {
    background-color:#008000;
}

.dashboard .content .main .itemlist .item .status.offline {
    background-color:#ff0000;
}

.dashboard .content .main .itemlist .item .status.scheduled {
    background-color:#ff9900;
}
/* #endregion */

.dashboard .content .team {
    padding:1rem;
}

.dashboard .content .team .item {
    padding:1rem;
    border-radius:0.5rem;
    border:1px solid rgba(16, 25, 40, 0.15);
}

.dashboard .content .team .item .portrait {
    width:10rem;
    height:10rem;
    border-radius:1rem;
    object-fit:cover;
}

.dashboard .content .team .item .name {
    font-size:1.5rem;
    font-weight:600;
    color:#323233;
    display:block;
}

.dashboard .content .team .item .name .title {
    font-size:0.8rem;
    font-weight:400;
    color:#323233;
    margin-left:0.5rem;
}

.dashboard .content .team .item .role {
    font-size:1.25rem;
    font-weight:bold;
    color:#999;
    display:block;
}

.dashboard .content .team .item .writeup {
    font-size:1rem;
    font-weight:400;
    color:#323233;
    overflow-y:auto;
    max-height:10rem;
}

.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    display: none;
}

.popup.visible {
    display: block;
}

.popup.active {
    opacity: 1;
}

.popup .inner {
    position: relative;
    background: white;
    width: 90%;
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 8px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.popup.active .inner {
    transform: translateY(0);
    opacity: 1;
}

.popup .close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    transition: background-color 0.2s ease;
}

.popup .close-button:hover {
    background: #e0e0e0;
}

.team .teamform {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.team .teamform h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.team .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.team .form-group label {
    font-weight: 600;
}

.team .form-group input[type="text"],
.team .form-group select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.team .portrait-upload {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.team .upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.team .upload-area:hover,
.team .upload-area.highlight {
    border-color: #666;
    background: #f9f9f9;
}

.team .upload-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.team .upload-prompt i {
    font-size: 2rem;
    color: #666;
}

.team .upload-prompt p {
    margin: 0;
    color: #666;
}

.team .form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.team .button {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

.team .button.submit {
    background: #007bff;
    color: white;
    padding: 0.75rem 1.5rem;
}

.team .button.cancel {
    background: #6c757d;
    color: white;
    padding: 0.75rem 1.5rem;
}

.team .fr-box {
    border: 1px solid #ddd;
    border-radius: 4px;
}

.fr-wrapper {
    max-height: 35vh;
    overflow-y: auto;
}

.team .notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 4px;
    color: white;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.team .notification.success {
    background-color: #4CAF50;
}

.team .notification.error {
    background-color: #f44336;
}

.team .item {
    position: relative;
    transition: all 0.3s ease;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    user-select: none;
    border: 2px solid transparent;
    will-change: transform, box-shadow, border-color;
    touch-action: none;
}

.team .item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.team .item.dragging {
    opacity: 0.9;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    background: #f8f9fa;
    z-index: 100;
    position: fixed !important;
    pointer-events: none;
    margin: 0;
}

.team .item.drag-over {
    position: relative;
}

.team .drop-indicator {
    position: absolute;
    left: 1rem;
    right: 1rem;
    height: 4px;
    background: rgba(0, 123, 255, 0.08);
    border: 2px dashed #007bff;
    border-radius: 2px;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.team .drop-indicator.active {
    opacity: 1;
    animation: dropZonePulse 1.5s ease-in-out infinite;
}

@keyframes dropZonePulse {
    0%, 100% {
        transform: scaleX(0.97);
        opacity: 0.8;
    }
    50% {
        transform: scaleX(1);
        opacity: 0.4;
    }
}

.team .item.drag-over::before {
    display: none;
}

.team .item.drag-over.drag-after::before,
.team .item.drag-over.drag-before::before {
    display: none;
}

.team .drag-handle {
    cursor: grab;
    padding: 0.5rem;
    color: #666;
    margin-right: 0.5rem;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    transition: transform 0.2s ease, color 0.2s ease;
}

.team .drag-handle:hover {
    color: #007bff;
    transform: scale(1.1);
}

.team .drag-handle:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.team .item.dragging .drag-handle {
    cursor: grabbing;
    color: #007bff;
}

.team.main {
    position: relative;
}

.team.main .item {
    position: relative;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.team .item:not(.dragging):hover {
    transform: translateX(4px);
}

/* #region Page: Structure */
.structure {
    padding: 2rem;
}

.structure-container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.structure-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 1rem;
}

.structure-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.last-updated {
    font-size: 0.9rem;
    color: #777;
}

.last-updated span {
    font-weight: 600;
    color: #444;
}

.structure-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.structure-box {
    background-color: #f6f7fb;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.structure-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.structure-box.non-editable {
    background-color: #e8eaf6;
    border: 1px solid #c5cae9;
}

.box-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.box-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    padding: 0.3rem;
    border-radius: 4px;
    min-height: 2.2rem;
}

.structure-box:not(.non-editable) .box-value {
    border: 1px dashed transparent;
    cursor: pointer;
}

.structure-box:not(.non-editable) .box-value:hover {
    border-color: #ccc;
    background-color: rgba(255, 255, 255, 0.5);
}

.structure-box:not(.non-editable) .box-value:focus {
    outline: none;
    border-color: #8a33e8;
    background-color: white;
    box-shadow: 0 0 0 2px rgba(138, 51, 232, 0.2);
}

.structure-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eaeaea;
}

.toggle-advanced {
    display: flex;
    align-items: center;
}

.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.toggle-label span {
    margin-right: 1rem;
    font-size: 0.9rem;
    color: #555;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #8a33e8;
}

input:focus + .toggle-slider {
    box-shadow: 0 0 1px #8a33e8;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.advanced-structure {
    border-top: 1px solid #eaeaea;
    padding-top: 2rem;
    display: none;
}

.advanced-structure.active {
    display: block;
}

.advanced-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.advanced-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.structure-table-container {
    overflow-x: auto;
}

.structure-table {
    width: 100%;
    border-collapse: collapse;
}

.structure-table th,
.structure-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eaeaea;
}

.structure-table th {
    background-color: #f6f7fb;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.structure-table tr:last-child td {
    border-bottom: none;
}

.structure-table tr:hover td {
    background-color: #f8f9fd;
}

.structure-table .no-data td {
    text-align: center;
    color: #888;
    padding: 2rem;
    font-style: italic;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

.table-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem;
    color: #888;
    transition: color 0.2s;
}

.table-actions button:hover {
    color: #333;
}

.table-actions .edit-entry:hover {
    color: #4285f4;
}

.table-actions .delete-entry:hover {
    color: #ea4335;
}

.price-input {
    position: relative;
}

.price-input .currency {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #555;
}

.price-input input {
    padding-left: 25px !important;
}

.structureform {
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
}

.structureform h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
}

.structureform .form-group {
    margin-bottom: 1.5rem;
}

.structureform .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.structureform .form-group input,
.structureform .form-group select,
.structureform .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #ddd;
    font-size: 1rem;
}

.structureform .form-group input:focus,
.structureform .form-group select:focus,
.structureform .form-group textarea:focus {
    outline: none;
    border-color: #8a33e8;
    box-shadow: 0 0 0 2px rgba(138, 51, 232, 0.2);
}

/* Provide a sensible default height and allow vertical resize for textareas */
.structureform .form-group textarea {
    min-height: 8rem;
    resize: vertical;
}

.structureform .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* Reusing the notification styles from the team page */

/* #endregion */

/* Global utility classes */
.flex {
    display: flex;
}

.gapmicro {
    gap: 0.5rem;
}

.center {
    align-items: center;
}

.colgapmicro {
    column-gap: 0.5rem;
}

.justcenter {
    justify-content: center;
}

.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 2rem;
}

.quicktrans {
    transition: all 0.2s ease;
}

.maintop {
    display: flex;
    margin-bottom: 1rem;
}

/* Global selector buttons */
.selector.button {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.selector.button.active {
    background: #007bff;
    color: white;
}

/* Global add new button */
.button.addnew {
    margin-left: auto;
    background: #007bff;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.button.addnew:hover {
    background: #0056b3;
}

/* Action buttons */
.actions .button {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius:0.25rem;
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: #333;
}

.actions .button:hover {
    background: #e0e0e0;
}

/* Tab content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Global notification styling */
#notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 4px;
    color: white;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none;
}

#notification.visible {
    display: block;
    opacity: 1;
}

#notification.success {
    background-color: #4CAF50;
}

#notification.error {
    background-color: #f44336;
}

/* Structure specific styles */
.structure-table tr {
    transition: background-color 0.2s ease;
}

.structure-table tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* #endregion */