/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #5865F2;
    --success-color: #43B581;
    --warning-color: #FAA61A;
    --danger-color: #F04747;
    --bg-darkest: #0F1014;
    --bg-darker: #18191D;
    --bg-dark: #1E1F23;
    --bg-card: #25262B;
    --bg-hover: #2C2D32;
    --text-light: #E4E6EB;
    --text-muted: #B0B3B8;
    --text-gray: #8A8D91;
    --border-color: #3A3B40;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-darkest);
    color: var(--text-light);
    line-height: 1.6;
}

.page {
    min-height: 100vh;
}

/* Login Page */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1d29 0%, #252837 100%);
}

.login-card {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.login-card h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.login-card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.login-info {
    font-size: 0.875rem;
    margin-top: 1.5rem !important;
}

/* Header */
.header {
    background: var(--bg-darker);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.5rem;
    color: var(--text-light);
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.user-info {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Navigation Tabs */
.nav-tabs {
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-tab {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    color: var(--text-gray);
    font-size: 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-tab:hover {
    color: var(--primary-color);
    background: var(--bg-hover);
}

.nav-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: var(--bg-hover);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.tab-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-end;
}

.bulk-start-controls {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.bulk-start-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.bulk-start-count {
    width: 6rem;
}

.bulk-start-server {
    width: 20rem;
    max-width: 45vw;
}

.bulk-start-custom {
    width: 16rem;
    max-width: 38vw;
}

.bulk-start-custom-field[hidden] {
    display: none;
}

.tab-header h2 {
    font-size: 1.5rem;
    color: var(--text-light);
}

.run-all-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.875rem 1rem;
    background: rgba(88, 101, 242, 0.14);
    border: 1px solid rgba(88, 101, 242, 0.45);
    border-radius: 8px;
    color: var(--text-light);
}

.run-all-banner-title {
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.run-all-banner-detail {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.run-all-banner-count {
    flex: 0 0 auto;
    min-width: 5.5rem;
    padding: 0.35rem 0.65rem;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-weight: 700;
    text-align: center;
}

.server-counts-panel {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.auto-seed-panel {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.auto-seed-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.875rem;
}

.auto-seed-controls {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.auto-seed-controls label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.auto-seed-controls input {
    width: 8rem;
}

.toggle-field {
    position: relative;
    display: inline-flex;
    width: 3rem;
    height: 1.65rem;
    flex: 0 0 auto;
}

.toggle-field input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    width: 1.1rem;
    height: 1.1rem;
    left: 0.25rem;
    top: 0.22rem;
    background: var(--text-muted);
    border-radius: 50%;
    transition: transform 0.2s ease, background 0.2s ease;
}

.toggle-field input:checked + .toggle-slider {
    background: rgba(67, 181, 129, 0.18);
    border-color: rgba(67, 181, 129, 0.42);
}

.toggle-field input:checked + .toggle-slider::before {
    transform: translateX(1.28rem);
    background: var(--success-color);
}

.server-counts-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.875rem;
}

.server-counts-title {
    color: var(--text-light);
    font-weight: 700;
}

.server-counts-meta,
.server-counts-empty {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.server-counts-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-light);
    font-size: 1.5rem;
    line-height: 1;
}

.server-counts-status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.server-counts-status-live {
    color: var(--success-color);
    background: rgba(67, 181, 129, 0.14);
    border: 1px solid rgba(67, 181, 129, 0.28);
}

.server-counts-status-error {
    color: var(--danger-color);
    background: rgba(240, 71, 71, 0.14);
    border: 1px solid rgba(240, 71, 71, 0.28);
}

.server-counts-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.75rem;
}

.server-count-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    min-height: 4rem;
    padding: 0.75rem;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.server-count-name {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.server-count-name span,
.server-count-name small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.server-count-name span {
    color: var(--text-light);
    font-weight: 600;
}

.server-count-name small {
    color: var(--text-gray);
}

.server-count-value {
    flex: 0 0 auto;
    color: var(--text-light);
    font-size: 1.25rem;
    font-weight: 800;
}

/* Settings */
.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.settings-card + .settings-card {
    margin-top: 1.5rem;
}

.settings-card-header {
    margin-bottom: 1.5rem;
}

.settings-card-header h3 {
    color: var(--text-light);
    margin-bottom: 0.35rem;
}

.settings-description {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.settings-form {
    max-width: 720px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0 1rem;
}

.settings-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.settings-status {
    min-height: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.settings-status-success {
    color: var(--success-color);
}

.settings-status-error {
    color: var(--danger-color);
}

.settings-status-info {
    color: var(--text-muted);
}

.settings-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.accounts-list {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.account-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-darker);
}

.account-row-main {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    min-width: 0;
}

.account-identity {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.account-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    min-height: 2rem;
    padding: 0 0.5rem;
    border-radius: 4px;
    color: var(--text-light);
    background: var(--bg-card);
    font-weight: 600;
}

.account-email {
    min-width: 0;
    color: var(--text-light);
    overflow-wrap: anywhere;
}

.account-epic-details {
    color: var(--text-gray);
    font-size: 0.8125rem;
    overflow-wrap: anywhere;
}

/* Stats Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}

.stat:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-light);
}

.stat-success {
    color: var(--success-color);
}

.stat-danger {
    color: var(--danger-color);
}

/* Instances Grid */
.instances-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.instance-card {
    background: var(--bg-card);
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.instance-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.instance-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.instance-identity {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.instance-title {
    font-weight: bold;
    color: var(--text-light);
    font-size: 1.125rem;
    overflow-wrap: anywhere;
}

.instance-subtitle {
    color: var(--text-gray);
    font-size: 0.8125rem;
    overflow-wrap: anywhere;
}

.instance-status {
    flex: 0 0 auto;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-idle {
    background: rgba(227, 229, 232, 0.1);
    color: #B0B3B8;
    border: 1px solid rgba(227, 229, 232, 0.2);
}

.status-running {
    background: rgba(67, 181, 129, 0.2);
    color: #43B581;
    border: 1px solid rgba(67, 181, 129, 0.3);
}

.status-error {
    background: rgba(240, 71, 71, 0.2);
    color: #F04747;
    border: 1px solid rgba(240, 71, 71, 0.3);
}

.instance-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-gray);
}

.instance-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.btn-dropdown {
    position: relative;
    display: inline-flex;
}

.btn-split-main {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.btn-split-toggle {
    min-width: 2.25rem;
    padding-left: 0.625rem;
    padding-right: 0.625rem;
    border-left: 1px solid rgba(255, 255, 255, 0.22);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.bulk-action-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    z-index: 20;
    display: none;
    min-width: 12rem;
    padding: 0.35rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-card);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.28);
}

.btn-dropdown.open .bulk-action-menu {
    display: block;
}

.bulk-action-menu-item {
    display: block;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.bulk-action-menu-item:hover:not(:disabled) {
    background: var(--bg-hover);
}

.bulk-action-menu-item:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #4752C4;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #3CA374;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #D84040;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background: #E09616;
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-light);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--text-gray);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

/* Schedules */
.schedules-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.schedule-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s ease;
}

.schedule-card:hover {
    border-color: var(--primary-color);
}

.schedule-info h3 {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.schedule-details {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.schedule-actions {
    display: flex;
    gap: 0.5rem;
}

/* Logs */
.logs-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    background: var(--bg-card);
    color: var(--text-light);
    cursor: pointer;
    width: 100%;
}

.select:focus {
    outline: none;
    border-color: var(--primary-color);
}

select.select option {
    background: var(--bg-card);
    color: var(--text-light);
}

.logs-container {
    background: #0D0D0D;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    max-height: 600px;
    overflow-y: auto;
    font-family: "Monaco", "Menlo", "Consolas", monospace;
    font-size: 0.75rem;
}

.log-entry {
    padding: 0.25rem 0;
    color: #D4D4D4;
}

.log-timestamp {
    color: #858585;
}

.log-level-error {
    color: #F04747;
}

.log-level-warn {
    color: #FAA61A;
}

.log-level-info {
    color: #43B581;
}

.log-level-debug {
    color: #5865F2;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-large {
    max-width: 900px;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: var(--text-light);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-gray);
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--text-light);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* Instance Details */
.instance-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-section h3 {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.screenshot-container {
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.screenshot-container img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.modal-logs {
    background: #0D0D0D;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
    font-family: "Monaco", "Menlo", "Consolas", monospace;
    font-size: 0.75rem;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.875rem;
}

.form-group input[type="checkbox"] {
    margin-right: 0.5rem;
}

.input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    background: var(--bg-darker);
    color: var(--text-light);
    font-family: inherit;
}

.input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.input::placeholder {
    color: var(--text-gray);
}

.form-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Calendar View */
.calendar-container {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.calendar-header {
    margin-bottom: 1.5rem;
}

.calendar-header h3 {
    color: var(--text-light);
    font-size: 1.25rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-day {
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    min-height: 120px;
    display: flex;
    flex-direction: column;
}

.calendar-day-header {
    background: var(--bg-dark);
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-light);
    border-bottom: 1px solid var(--border-color);
}

.calendar-day-content {
    padding: 0.5rem;
    flex: 1;
    overflow-y: auto;
    font-size: 0.75rem;
}

.calendar-event {
    background: var(--primary-color);
    color: white;
    padding: 0.375rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.25rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.calendar-event:hover {
    opacity: 0.8;
}

.calendar-event-time {
    font-weight: 600;
    display: block;
}

.calendar-event-details {
    font-size: 0.7rem;
    opacity: 0.9;
}

/* Schedules Section */
.schedules-section {
    margin-top: 2rem;
}

.schedules-section h3 {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* Day Selector */
.day-selector {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.day-checkbox {
    position: relative;
    cursor: pointer;
}

.day-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.day-label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    padding: 0.75rem 1rem;
    background: var(--bg-darker);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    user-select: none;
}

.day-checkbox:hover .day-label {
    border-color: var(--primary-color);
    color: var(--text-light);
}

.day-checkbox input[type="checkbox"]:checked + .day-label {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Time Picker */
.time-picker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.time-select {
    width: auto;
    flex: 1;
    max-width: 100px;
}

.time-separator {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-light);
}

/* Bot Count Selector */
.bot-count-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 200px;
}

.bot-count-input {
    text-align: center;
    font-size: 1.125rem;
    font-weight: 600;
}

.bot-count-input::-webkit-inner-spin-button,
.bot-count-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Radio Group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem;
    background: var(--bg-darker);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.radio-label:hover {
    border-color: var(--primary-color);
}

.radio-label input[type="radio"] {
    margin-right: 0.75rem;
    cursor: pointer;
}

.radio-label input[type="radio"]:checked + span {
    color: var(--primary-color);
    font-weight: 600;
}

.radio-label input[type="radio"]:checked {
    accent-color: var(--primary-color);
}

/* Bot Checklist */
.bot-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.bot-checklist label {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.bot-checklist label:hover {
    background: var(--bg-hover);
}

.bot-checklist input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Schedule Preview */
.schedule-preview {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.schedule-preview h4 {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.preview-text {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.6;
}

.preview-highlight {
    color: var(--primary-color);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-tabs {
        overflow-x: auto;
    }

    .instances-grid {
        grid-template-columns: 1fr;
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .tab-header,
    .server-counts-header,
    .run-all-banner {
        align-items: stretch;
        flex-direction: column;
    }

    .tab-actions {
        justify-content: flex-start;
    }

    .bulk-start-controls,
    .bulk-start-field,
    .bulk-start-count,
    .bulk-start-server,
    .bulk-start-custom {
        width: 100%;
        max-width: none;
    }

    .run-all-banner-count {
        width: fit-content;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .logs-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .modal-footer {
        flex-wrap: wrap;
    }

    .calendar-grid {
        grid-template-columns: 1fr;
    }

    .time-picker {
        flex-direction: column;
        align-items: stretch;
    }

    .time-select {
        max-width: 100%;
    }

    .day-selector {
        justify-content: center;
    }

    .bot-checklist {
        grid-template-columns: 1fr;
    }
}
