:root {
    --sw-purple: #3f1fa3;
    --sw-purple-dark: #26106f;
    --sw-green: #1fd58a;
    --sw-accent: #00b5ff;
    --sw-bg: #f7f5ff;
    --sw-text-dark: #241b3c;
    --sw-text-muted: #7a7a8c;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--sw-bg);
    color: var(--sw-text-dark);
}

a { color: var(--sw-purple); text-decoration: none; }
a:hover { text-decoration: underline; }

.login-page {
    display: flex;
    min-height: 100vh;
}

/* LEFT SIDE */
.login-left {
    flex: 1 1 35%;
    background:
        radial-gradient(circle at top left, var(--sw-purple) 0, var(--sw-purple-dark) 70%, #120539 100%);
    color: #fff;
    padding: 40px 60px;
    display: flex;
    flex-direction: column;
}

.logo { margin-bottom: 60px; }
.logo img {     width: 100%;
    max-width: 288px;
    filter: brightness(0) invert(1); }

.login-left-tag {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #30e29c;
    margin-bottom: 16px;
}

.login-left-title {
    font-size: 48px;
    line-height: 1.1;
    font-weight: 800;
}


.login-left-footer {
    margin-top: 20px;
    font-size: 12px;
}

/* RIGHT SIDE */
.login-right {
    flex: 1 1 65%;
    background: #fff;
    padding: 60px 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-right-inner {
    max-width: 420px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.login-right-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--sw-purple);
    margin-bottom: 30px;
}

.form-group { margin-bottom: 18px; }

.form-label {
    font-size: 14px;
    margin-bottom: 6px;
    display: block;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border-radius: 4px;
    border: 1px solid #e1e1f0;
    font-size: 14px;
    background: #f7f7fb;
}

.form-control:focus {
    outline: none;
    border-color: var(--sw-purple);
    box-shadow: 0 0 0 1px rgba(63, 31, 163, 0.15);
    background: #fff;
}

.form-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--sw-text-muted);
    margin-bottom: 24px;
}

.form-remember input {
    width: 16px;
    height: 16px;
}

.btn-primary {
    display: inline-block;
    width: 100%;
    padding: 14px 16px;
    border-radius: 999px;
    border: none;
    background: var(--sw-green);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    text-align: center;
}

.btn-primary:hover { background: #1ab67e; }

.login-links {
    margin-top: 16px;
    font-size: 13px;
    text-align: right;
}

.alert-error {
    background: #ffe6e6;
    color: #c62828;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 16px;
}

.form-error {
    color: #c62828;
    font-size: 12px;
    margin-top: 4px;
}

.form-group.has-error .form-control {
    border-color: #c62828;
}

.loggedin {
    display: flex;
    min-height: 100vh;
}

.menu {
    flex: 1 1 15%;
    background:
        radial-gradient(circle at top left, var(--sw-purple) 0, var(--sw-purple-dark) 70%, #120539 100%);
    color: #fff;
    padding: 20px 20px;
    display: flex;
    flex-direction: column;
}
.menu .logo {
  margin-bottom: 30px;
}

.menulink {
  color: #ffffff;
}
.menulink:hover {
  text-decoration: none;
  color: lightblue;
}

.loggedincontent {
    flex: 1 1 85%;
    background: #fff;
    padding: 10px 80px;
    display: flex;
    flex-direction: column;
}
.menu-nav {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
}

/* Main menu items */
.menu-item {
    position: relative;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0px;
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}

.menu-link:hover {
    color: lightblue;
    text-decoration: none;
}

.menu-icon {
    width: 20px;
    text-align: center;
    padding-top: 5px;
}

.menu-submenu {
    display: none;
    margin-top: 4px;
    padding-left: 28px;
    display: none;
    flex-direction: column;
    gap: 3px;
}

.menu-item:hover > .menu-submenu,
.menu-item.is-open > .menu-submenu {
    display: flex;
}

.menu-sublink {
    font-size: 14px;
    color: #ffffff;
    text-decoration: none;
    padding: 3px 0;
}

.menu-sublink:hover {
    color: lightblue;
    text-decoration: none;
}

.menu-sublink.is-active {
    font-weight: 600;
    color: lightblue;
}

.titleholder {
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.btn-add {
    background: #3f1fa3;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
}
.btn-add:hover {
    background: #26106f;
    text-decoration: none;
}

.btn-danger {
    background: #cc1840;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
}
.btn-danger:hover {
    background: #f33e67;
    text-decoration: none;
}

.data-table tbody tr:hover {
    background-color: #f5f3fd !important;
}
.data-table thead .sorting:after,
.data-table thead .sorting_asc:after,
.data-table thead .sorting_desc:after {
    color: #6a38ff !important;
    opacity: 0.5;
}

.dataTables_filter input {
    border: 1px solid #c7b8ff;
    padding: 6px 8px;
    border-radius: 4px;
}

.dataTables_filter input:focus {
    outline: none;
    border-color: #6a38ff;
    box-shadow: 0 0 0 2px rgba(106, 56, 255, 0.2);
}
.action-icon img {
    width: 18px;
    height: 18px;
    vertical-align: middle;
}

.action-icon {
    margin-right: 6px
}

.action-icon:hover {
    text-decoration: none;
    opacity: 0.5;
}

.table-wrapper {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

h1 {
    position: relative;
    padding-bottom: 14px;
    margin-bottom: 26px;
}

h1::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #3f1fa3, #7EC8FF);
    border-radius: 2px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 40px;
    max-width: 900px;
}

.form-column {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-full {
    grid-column: 1 / span 2;
    margin-top: 10px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #c9c9d9;
    border-radius: 6px;
    font-size: 15px;
}

.form-control:focus {
    outline: none;
    border-color: #7EC8FF;
    box-shadow: 0 0 0 2px rgba(126, 200, 255, 0.3);
}

.btn-primary {
    background: #6a38ff;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    border: none;
    font-size: 15px;
    cursor: pointer;
    font-weight: 600;
}

.btn-primary:hover {
    background: #7EC8FF;
    color: #1d1d1d;
    text-decoration: none;
}

.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 58%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    opacity: 0.6;
    user-select: none;
}

.toggle-password:hover {
    opacity: 1;
}

.confirmation-success {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    opacity: 1;
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 9999;
}

.confirmation-success.hide {
    opacity: 0;
    transform: translateY(-10px);
}

.server-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 20px;
}

.server-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 3px 12px rgba(0,0,0,0.07);
}

.server-card h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.server-count {
    font-size: 42px;
    font-weight: bold;
    color: #6a38ff;
    margin: 15px 0;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 15px;
}
.titlebuttonholder {
  display: flex;
  gap:30px;
}
.overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.hidden {
    display: none;
}

.overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

.overlay-modal {
    position: relative;
    width: 420px;
    margin: 120px auto;
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

.overlay-modal h2 {
    margin-top: 0;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 8px;
}

.overlay-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-cancel {
    padding: 8px 16px;
    background: #ccc;
    border: none;
    cursor: pointer;
}
.btn-orange {
    background: #de9818;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
}
.btn-orange:hover {
    background: #f0b448;
    text-decoration: none;
}
.btn-green {
  background: #14b534;
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}
.btn-green:hover {
    background: #40d85f;
    text-decoration: none;
}
.deploy-console {
    margin-top:20px;
    border-radius:6px;
    background:#111;
    color:#00ff90;
    font-family:monospace;
    font-size:13px;
    max-height: 150px;
}

.console-header {
    padding:8px 12px;
    background:#222;
    border-bottom:1px solid #333;
}

.console-body {
    padding:12px;
    max-height:130px;
    overflow-y:auto;
}

.console-line {
    margin-bottom:4px;
}

.console-installed { color:#00ff90; }
.console-skipped { color:#ffaa00; }
.console-error { color:#ff4040; }
#force_overwrite, #real_force_overwrite, .role-checkbox {
  width: 20px;
  height: 20px;
  margin-right: 20px;
  float: left;
}
.overwrite {
  margin-top: -7px;
}


#pluginModal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9999;
}

#pluginModal .modal-content {
    background: #fff;
    width: 900px;
    max-width: 90%;
    margin: 40px auto;
    max-height: 70vh;
    overflow-y: auto;
    padding: 20px;
    border-radius: 6px;
}

#pluginModalClose {
    border: none;
    background: none;
    font-size: 25px;
    font-weight: 800;
    background-color: #3f1fa3;
    margin-top: -30px;
    margin-right: 2px;
    padding: 0 5px;
    border-radius: 5px;
    color: #ffffff;
    cursor: pointer;
}
#pluginModalClose:hover {
  opacity: 0.85;
}
.lt-arrow {
    display:inline-block;
    width:12px;
    height:12px;
    margin-left:6px;
}

.lt-arrow svg {
    width:100%;
    height:100%;
    fill:currentColor;
}

.lt-up {
    color:#16a34a;
}

.lt-down {
    color:#dc2626;
}
.menu-submenu hr {
  opacity: 0.3;
}
.smalloverwrite {
  font-weight: 400;
  font-size: 12px;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: #fff;
    width: 900px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
}

.modal .titleholder {
    flex: 0 0 auto;
}

.modal .table-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

#pluginTable { 
    width: 100%; 
    border-collapse: collapse; 
} 
#pluginTable thead { 
    display: table; 
    width: 100%; 
    table-layout: fixed; 
} 
#pluginTable tbody { 
    display: block; 
    height: 80vh; overflow-y: auto; 
    width: 100%; 
} 
#pluginTable tbody tr { 
    display: table; 
    width: 100%; 
    table-layout: fixed; 
}

#pluginSearchTable {
    width: 100%;
    border-collapse: collapse;
}

#divPluginSearch {
    margin-top: 50px; 
}
th.no-sort::after, th.no-sort::before {
    display: none !important;
}

.month-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.month-tab {
    cursor: pointer;
    transition: 0.2s;
    border: 2px solid transparent;
}

.month-tab:hover {
    transform: translateY(-3px);
}

.month-tab.active {
    border: 2px solid #3f1fa3;
    background: radial-gradient(circle at top left, var(--sw-purple) 0, var(--sw-purple-dark) 70%, #120539 100%);
    color: #ffffff;
}
.month-tab.active .server-count {
    border: none;
    color: #ffffff;
}

.data-table {
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.data-table thead {
    background: radial-gradient(circle at top left, var(--sw-purple) 0, var(--sw-purple-dark) 70%, #120539 100%);
    color: #fff;
}

.data-table th, 
.data-table td {
    padding: 10px 12px;
    text-align: left;
}

.data-table tbody tr {
    border-bottom: 1px solid #eee;
}

.data-table tbody tr:hover {
    background: #f9f9f9;
}

.data-table td:nth-child(4) {
    color: #2c3e50;
    text-align: right;
    padding-right: 30px;
}

.data-table tr.spacer-row {
    background: #f1f5f9;
    font-weight: bold;
}
.data-table tr.weeklytotal td:nth-child(2), .data-table tr.spacer-row:last-child td:nth-child(2) {    
    text-align: right!important;
    padding-right: 30px!important;
}
.data-table tr.spacer-row td {
    height: 10px;
    background: transparent;
    border: none;
}

.heatmap-wrapper {
    margin-bottom: 50px;
    margin-top: 50px;
    position: relative;
}
.heatmap-month {
    position: absolute;
    top: 0;
    bottom: 0;
    background: rgba(0,0,0,0.03);
    border-radius: 6px;
}

.heatmap-label {
    position: absolute;
    bottom: -20px;
    font-size: 12px;
    color: #666;
}

#heatmap {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(7, 12px);
    gap: 4px;
    z-index: 1; 
    position: relative;
}

.heat-cell {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: #ebedf0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.heat-cell:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.heat-0 { background: #f5f3ff; }
.heat-1 { background: #e0dbff; }
.heat-2 { background: #bdb2ff; }
.heat-3 { background: #8c78ff; }
.heat-4 { background: #1a094e; }

.heatmap-label {
    position: absolute;
    top: -40px;
    font-size: 20px;
    color: #241b3c;
    font-weight: 800;
    z-index: 0;
    text-transform: uppercase;
}

.custom-tooltip {
    position: absolute;
    background: #2c2c2c;
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    pointer-events: none;
    display: none;
    z-index: 9999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.tooltip-date {
    font-weight: bold;
    margin-bottom: 3px;
}

.heatmap-divider {
    width: 6px;
    height: 16px;
    background: #3b1d9b;
}
.ranking-table {
    margin-bottom: 40px;
}

.rank-gold {
    background: #ffd70020;
}

.rank-silver {
    background: #c0c0c020;
}

.rank-bronze {
    background: #cd7f3220;
}

.ranking-table tbody tr:hover {
    background: rgba(0,0,0,0.05);
    transition: 0.2s;
}