/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a1a;
    color: #f5f5f5;
    overflow: hidden;
    user-select: none;
}

/* App Container */
.app-container {
    display: grid;
    grid-template-areas: 
        "header header"
        "sidebar main";
    grid-template-rows: 60px 1fr;
    grid-template-columns: 250px 1fr;
    height: 100vh;
}

/* Header */
.header {
    grid-area: header;
    background: linear-gradient(135deg, #2d2d2d, #1a1a1a);
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-left h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ff6b6b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.version {
    background: #333;
    color: #888;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: #2a2a2a;
    border-radius: 20px;
    border: 1px solid #333;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #888;
    animation: pulse 2s infinite;
}

.status-dot.online {
    background: #4ecdc4;
}

.status-dot.offline {
    background: #ff6b6b;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Sidebar Navigation */
.sidebar {
    grid-area: sidebar;
    background: #2a2a2a;
    border-right: 1px solid #333;
    padding: 20px 0;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    color: #f5f5f5;
    font-weight: 600;
}

.nav-item:hover {
    background: #333;
    border-left-color: #2196f3;
    color: #ffffff;
}

.nav-item.active {
    background: #333;
    border-left-color: #2196f3;
    color: #2196f3;
    font-weight: 700;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    grid-area: main;
    background: #1a1a1a;
    padding: 20px;
    overflow-y: auto;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Dashboard Styles */
.dashboard-title-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.dashboard-header h2 {
    color: #e0e0e0;
    margin: 0;
    font-size: 1.8rem;
}

#sendToDiscordBtn {
    background: linear-gradient(135deg, #5865f2, #4752c4);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

#sendToDiscordBtn:hover {
    background: linear-gradient(135deg, #4752c4, #3c45a5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
}

#sendToDiscordBtn:active {
    transform: translateY(0);
}

#sendToDiscordBtn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#sendToDiscordBtn i {
    font-size: 16px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #2d2d2d, #252525);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-card:nth-child(1) .stat-icon { background: #ff6b6b; }
.stat-card:nth-child(2) .stat-icon { background: #4ecdc4; }
.stat-card:nth-child(3) .stat-icon { background: #45b7d1; }
.stat-card:nth-child(4) .stat-icon { background: #96ceb4; }

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #e0e0e0;
    margin-bottom: 5px;
}

.stat-info p {
    color: #888;
    font-size: 0.9rem;
}

/* Boss Grid */
.boss-grid-container h3 {
    color: #e0e0e0;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.boss-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.boss-card {
    background: linear-gradient(135deg, #2d2d2d, #252525);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.boss-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.boss-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.boss-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #e0e0e0;
}

.boss-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.boss-status.spawned { background: #4ecdc4; color: #1a1a1a; }
.boss-status.countdown { background: #ff6b6b; color: white; }
.boss-status.unknown { background: #888; color: white; }

.boss-timer {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff6b6b;
    text-align: center;
    margin: 15px 0;
}

.boss-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Action buttons for table rows */
.action-buttons {
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.action-buttons .btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    min-width: 80px;
    white-space: nowrap;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: #ff6b6b;
    color: white;
}

.btn-primary:hover {
    background: #ff5252;
}

.btn-secondary {
    background: #4ecdc4;
    color: #1a1a1a;
}

.btn-secondary:hover {
    background: #45b7d1;
}

.btn-success {
    background: #4caf50;
    color: white;
    border: none;
}

.btn-success:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.btn-warning {
    background: #ffa726;
    color: #1a1a1a;
}

.btn-warning:hover {
    background: #ff9800;
}

.btn-danger {
    background: #ef5350;
    color: white;
}

.btn-danger:hover {
    background: #e53935;
}

.btn-icon {
    padding: 8px;
    background: #333;
    color: #e0e0e0;
}

.btn-icon:hover {
    background: #444;
}

.btn-small {
    padding: 4px 8px;
    font-size: 0.8rem;
}

/* Dashboard Table Styles */
.table-container {
    background: #2a2a2a;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid #333;
}

.boss-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: #f5f5f5;
}

.boss-table th {
    background: linear-gradient(135deg, #333 0%, #2a2a2a 100%);
    color: #ffffff;
    padding: 15px 12px;
    text-align: left;
    font-weight: 700;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid #444;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
    position: relative;
}

.boss-table th:hover {
    background: linear-gradient(135deg, #3a3a3a 0%, #313131 100%);
}

.boss-table th.sortable {
    padding-right: 30px;
}

.boss-table th.sortable::after {
    content: '⇅';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    font-size: 12px;
    transition: opacity 0.2s ease;
}

.boss-table th.sortable:hover::after {
    opacity: 0.8;
}

.boss-table th.sort-asc::after {
    content: '▲';
    opacity: 1;
    color: #4ecdc4;
}

.boss-table th.sort-desc::after {
    content: '▼';
    opacity: 1;
    color: #4ecdc4;
}

.boss-table th.sort-active {
    background: linear-gradient(135deg, #4ecdc4 0%, #45b7d1 100%);
    color: #ffffff;
}

.boss-table td {
    padding: 12px;
    border-bottom: 1px solid #333;
    vertical-align: middle;
    color: #f5f5f5;
    font-weight: 500;
}

.boss-table tbody tr:hover {
    background-color: #333;
    transition: background-color 0.2s ease;
}

.boss-table tbody tr:last-child td {
    border-bottom: none;
}

/* Boss Status Styles */
.boss-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.boss-status.spawned {
    background-color: #4caf50;
    color: #ffffff;
    border: 1px solid #45a049;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.3);
}

.boss-status.countdown {
    background-color: #ff9800;
    color: #ffffff;
    border: 1px solid #f57c00;
    box-shadow: 0 0 8px rgba(255, 152, 0, 0.3);
}



.boss-status.unknown {
    background-color: #666;
    color: #ffffff;
    border: 1px solid #555;
}

/* Countdown Timer Styles */
.countdown-cell {
    text-align: center;
    font-weight: 600;
}

.countdown-timer {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 900;
    min-width: 80px;
    text-align: center;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #333 0%, #1a1a1a 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.countdown-timer.countdown {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    color: #2d3436;
    border: 2px solid #fdcb6e;
    animation: pulse 2s infinite;
}

.countdown-timer.spawned {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
    border: 2px solid #00b894;
    animation: glow 1.5s infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes glow {
    0% { box-shadow: 0 0 5px rgba(0, 184, 148, 0.5); }
    100% { box-shadow: 0 0 20px rgba(0, 184, 148, 0.8); }
}

/* Action Buttons in Table */
.boss-table .btn {
    margin: 0 2px;
    padding: 6px 10px;
    font-size: 12px;
}

.boss-table .btn i {
    margin-right: 4px;
}

/* Action Buttons */
.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 5px;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.edit-btn {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: #ffffff;
    border: 1px solid #1976d2;
}

.edit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
}

.boss-set-btn {
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    color: #ffffff;
    border: 1px solid #c2185b;
}

.boss-set-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.4);
    background: linear-gradient(135deg, #c2185b 0%, #ad1457 100%);
}

/* Responsive Table */
@media (max-width: 768px) {
    .table-container {
        overflow-x: auto;
    }
    
    .boss-table {
        min-width: 600px;
    }
    
    .boss-table th,
    .boss-table td {
        padding: 8px 6px;
        font-size: 12px;
    }
    
    .countdown-timer {
        font-size: 11px;
        padding: 4px 8px;
        min-width: 60px;
    }
}

/* Table Header Icons */
.boss-table th i {
    margin-right: 6px;
    opacity: 0.8;
}

/* Enhanced Table Styling */
.boss-table thead th:first-child {
    border-top-left-radius: 8px;
}

.boss-table thead th:last-child {
    border-top-right-radius: 8px;
}

/* Loading State for Table */
.table-loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.table-loading i {
    font-size: 24px;
    margin-bottom: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #e0e0e0;
    font-weight: 500;
}

.form-input, .form-select {
    width: 100%;
    padding: 10px;
    background: #333;
    border: 1px solid #444;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.9rem;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2);
}

/* Time Textbox Input */
.time-textbox {
    font-family: 'Courier New', monospace;
    text-align: center;
    letter-spacing: 1px;
    font-weight: bold;
    width: 120px !important;
}

.time-textbox::placeholder {
    color: #888;
    font-weight: normal;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.time-textbox:focus {
    background: #3a3a3a;
}

.time-textbox.error {
    border-color: #ff4444;
    background: #4a2222;
}

.time-textbox.valid {
    border-color: #44ff44;
    background: #224422;
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #999;
    font-style: italic;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #2a2a2a;
    border-radius: 12px;
    border: 1px solid #333;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #e0e0e0;
    font-size: 1.3rem;
}

.modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #333;
    color: #e0e0e0;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #333;
    background-color: #1e1e1e;
}

.modal-footer-left {
    display: flex;
    gap: 10px;
}

.modal-footer-right {
    display: flex;
    gap: 10px;
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.8);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.loading-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    text-align: center;
    color: #e0e0e0;
}

.loading-spinner i {
    font-size: 3rem;
    color: #ff6b6b;
    margin-bottom: 20px;
}

.loading-spinner p {
    font-size: 1.1rem;
}

/* Action Cards */
.database-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.action-card {
    background: linear-gradient(135deg, #2d2d2d, #252525);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.action-card h3 {
    color: #e0e0e0;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.action-card p {
    color: #888;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Settings */
.settings-sections {
    display: grid;
    gap: 30px;
    margin-top: 20px;
}

.settings-section {
    background: linear-gradient(135deg, #2d2d2d, #252525);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 25px;
}

.settings-section h3 {
    color: #e0e0e0;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.setting-item {
    margin-bottom: 15px;
}

.setting-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #e0e0e0;
}

.setting-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #ff6b6b;
}

.about-info {
    color: #888;
    line-height: 1.6;
}

.about-info p {
    margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-container {
        grid-template-areas: 
            "header"
            "main";
        grid-template-rows: 60px 1fr;
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .boss-grid {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Force 24-hour format for datetime-local inputs */
input[type="datetime-local"] {
    color-scheme: dark;
    color: #e0e0e0 !important;
    background: #333 !important;
    border: 1px solid #444 !important;
}

input[type="datetime-local"]::-webkit-datetime-edit-ampm-field {
    display: none !important;
    width: 0 !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Force 24-hour format for datetime inputs */
input[type="datetime-local"][data-format="24"]::-webkit-datetime-edit-ampm-field,
input[type="datetime-local"][data-time-format="24"]::-webkit-datetime-edit-ampm-field {
    display: none !important;
    width: 0 !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

input[type="datetime-local"]::-webkit-datetime-edit-hour-field {
    color: #e0e0e0 !important;
}

input[type="datetime-local"]::-webkit-datetime-edit-minute-field {
    color: #e0e0e0 !important;
}

input[type="datetime-local"]::-webkit-datetime-edit-day-field {
    color: #e0e0e0 !important;
}

input[type="datetime-local"]::-webkit-datetime-edit-month-field {
    color: #e0e0e0 !important;
}

input[type="datetime-local"]::-webkit-datetime-edit-year-field {
    color: #e0e0e0 !important;
}

/* Additional styles to ensure 24-hour format */
input[type="datetime-local"][lang="en-GB"],
input[type="datetime-local"][data-format="24"],
input[type="datetime-local"][data-time-format="24"] {
    color: #e0e0e0 !important;
    background: #333 !important;
    border: 1px solid #444 !important;
}

/* Hide AM/PM completely for 24-hour inputs */
input[type="datetime-local"][lang="en-GB"]::-webkit-datetime-edit-ampm-field,
input[type="datetime-local"][data-format="24"]::-webkit-datetime-edit-ampm-field,
input[type="datetime-local"][data-time-format="24"]::-webkit-datetime-edit-ampm-field {
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    display: none !important;
}

/* Datetime input group styling */
.datetime-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.datetime-date {
    flex: 1;
    min-width: 150px;
}

.datetime-time {
    flex: 1;
    min-width: 120px;
}

/* Ensure time input shows 24-hour format */
input[type="time"] {
    color: #e0e0e0 !important;
    background: #333 !important;
    border: 1px solid #444 !important;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}

input[type="time"]:focus {
    border-color: #007bff !important;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Custom Time Input Styling */
.custom-time-input {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    min-height: 40px;
    transition: border-color 0.2s ease;
}

.custom-time-input:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.custom-time-input .time-hour,
.custom-time-input .time-minute {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
    color: var(--text-color);
    width: 40px;
    text-align: center;
    outline: none;
}

.custom-time-input .time-hour:focus,
.custom-time-input .time-minute:focus {
    background: rgba(74, 144, 226, 0.1);
    border-radius: 2px;
}

.custom-time-input .time-separator {
    color: var(--text-color);
    font-weight: bold;
    font-size: 14px;
    user-select: none;
}

/* Dark mode support for custom time input */
[data-theme="dark"] .custom-time-input {
    background: var(--input-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .custom-time-input .time-hour,
[data-theme="dark"] .custom-time-input .time-minute {
    color: var(--text-color);
}

[data-theme="dark"] .custom-time-input .time-hour:focus,
[data-theme="dark"] .custom-time-input .time-minute:focus {
    background: rgba(74, 144, 226, 0.2);
}

/* Force 24-hour format for time inputs */
input[type="time"]::-webkit-datetime-edit-ampm-field {
    display: none !important;
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Additional rules for time inputs with specific attributes */
input[type="time"][data-format="24"]::-webkit-datetime-edit-ampm-field,
input[type="time"][data-time-format="24"]::-webkit-datetime-edit-ampm-field,
input[type="time"][lang="en-GB"]::-webkit-datetime-edit-ampm-field {
    display: none !important;
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
}
input[type="datetime-local"][lang="en-GB"]::-webkit-datetime-edit-ampm-field,
input[type="datetime-local"][data-format="24"]::-webkit-datetime-edit-ampm-field,
input[type="datetime-local"][data-time-format="24"]::-webkit-datetime-edit-ampm-field {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}

input[type="datetime-local"]::-webkit-datetime-edit-text {
    color: #e0e0e0 !important;
}

/* Additional 24-hour format enforcement */
.datetime-24h::-webkit-datetime-edit-ampm-field {
    display: none !important;
    width: 0 !important;
    visibility: hidden !important;
}

.datetime-24h {
    color-scheme: dark !important;
    color: #e0e0e0 !important;
}

.datetime-24h::-webkit-datetime-edit-hour-field {
    color: #e0e0e0 !important;
}

.datetime-24h::-webkit-datetime-edit-minute-field {
    color: #e0e0e0 !important;
}

.datetime-24h::-webkit-datetime-edit-day-field {
    color: #e0e0e0 !important;
}

.datetime-24h::-webkit-datetime-edit-month-field {
    color: #e0e0e0 !important;
}

.datetime-24h::-webkit-datetime-edit-year-field {
    color: #e0e0e0 !important;
}

.datetime-24h::-webkit-datetime-edit-text {
    color: #e0e0e0 !important;
}

/* AI Autokill Styles */
.autokill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

.autokill-header h2 {
    color: #e0e0e0;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.autokill-status {
    display: flex;
    align-items: center;
    gap: 20px;
}

.autokill-controls {
    display: flex;
    gap: 10px;
}

.autokill-settings {
    background: linear-gradient(135deg, #2d2d2d, #252525);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.autokill-settings h3 {
    color: #e0e0e0;
    margin-bottom: 20px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-item label {
    color: #e0e0e0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-item small {
    color: #888;
    font-size: 0.85rem;
    line-height: 1.4;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.autokill-stats {
    margin-bottom: 30px;
}

.autokill-stats h3 {
    color: #e0e0e0;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.autokill-logs {
    background: linear-gradient(135deg, #2d2d2d, #252525);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 25px;
}

.logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.logs-header h3 {
    color: #e0e0e0;
    font-size: 1.3rem;
}

.logs-actions {
    display: flex;
    gap: 10px;
}

.autokill-table {
    width: 100%;
    border-collapse: collapse;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.autokill-table th,
.autokill-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #333;
}

.autokill-table th {
    background: #333;
    color: #e0e0e0;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.autokill-table td {
    color: #f5f5f5;
    font-size: 0.9rem;
}

.autokill-table tbody tr:hover {
    background: #2a2a2a;
}

/* Autokill Boss List Styles */
.autokill-boss-list {
    margin-bottom: 30px;
}

.boss-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.boss-list-header h3 {
    color: #e0e0e0;
    margin: 0;
    font-size: 1.2rem;
}

.boss-list-actions {
    display: flex;
    gap: 10px;
}

.autokill-boss-table {
    width: 100%;
    border-collapse: collapse;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.autokill-boss-table th,
.autokill-boss-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #333;
}

.autokill-boss-table th {
    background: #333;
    color: #e0e0e0;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.autokill-boss-table td {
    color: #f5f5f5;
    font-size: 0.9rem;
}

.autokill-boss-table tbody tr:hover {
    background: #2a2a2a;
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #333;
}

.pagination button {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.pagination span {
    color: #888;
    font-size: 0.9rem;
}

/* Status badges for autokill logs */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.success {
    background: #4caf50;
    color: white;
}

.status-badge.error {
    background: #f44336;
    color: white;
}

.status-badge.pending {
    background: #ff9800;
    color: white;
}

/* Autokill service status indicators */
.autokill-status .status-dot.running {
    background: #4caf50;
}

.autokill-status .status-dot.stopped {
    background: #f44336;
}

.autokill-status .status-dot.starting {
    background: #ff9800;
}

/* Responsive adjustments for autokill */
@media (max-width: 768px) {
    .autokill-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .autokill-status {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .autokill-controls {
        width: 100%;
        justify-content: center;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .logs-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .logs-actions {
        width: 100%;
        justify-content: center;
    }
}

/* Discord Configuration Styles */
.discord-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.discord-header h2 {
    color: #e0e0e0;
    font-size: 1.8rem;
}

.discord-status {
    display: flex;
    align-items: center;
    gap: 15px;
}

.discord-config {
    background: linear-gradient(135deg, #2d2d2d, #252525);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.discord-config h3 {
    color: #e0e0e0;
    margin-bottom: 20px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.discord-config h3::before {
    content: "🔗";
    font-size: 1.2rem;
}

.discord-info {
    background: linear-gradient(135deg, #2d2d2d, #252525);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

/* Template Editor Styles */
.template-editor {
    margin-top: 20px;
}

.template-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #333;
}

.template-tab {
    background: transparent;
    border: none;
    color: #888;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.template-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ccc;
}

.template-tab.active {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
    border-bottom: 2px solid #4a90e2;
}

.template-content {
    margin-bottom: 20px;
}

.template-panel {
    display: none;
}

.template-panel.active {
    display: block;
}

.template-input {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    resize: both;
    min-height: 60px;
    width: 80%;
    max-width: 100%;
}

.template-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.template-preview {
    background: linear-gradient(135deg, #1a1a1a, #0f0f0f);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.template-preview h4 {
    color: #e0e0e0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-content {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 15px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #f0f0f0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.template-help {
    background: linear-gradient(135deg, #1a2332, #0f1419);
    border: 1px solid #2a3441;
    border-radius: 8px;
    padding: 20px;
}

.template-help h4 {
    color: #e0e0e0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.placeholder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.placeholder-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #333;
    border-radius: 6px;
}

.placeholder-item code {
    background: #2a2a2a;
    color: #4a90e2;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    user-select: none;
}

.placeholder-item code:hover {
    background: #3a3a3a;
    color: #5ba0f2;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.placeholder-item code:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(74, 144, 226, 0.2);
}

/* Copy feedback tooltip */
.copy-tooltip {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.copy-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

.copy-tooltip.show {
    opacity: 1;
}

.placeholder-item span {
    color: #aaa;
    font-size: 0.85rem;
    line-height: 1.3;
}

.discord-info h3 {
    color: #e0e0e0;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-2px);
}

.info-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    background: #5865f2; /* Discord brand color */
}

.info-content h4 {
    color: #e0e0e0;
    margin-bottom: 5px;
    font-size: 1rem;
}

.info-content p {
    color: #f5f5f5;
    margin-bottom: 3px;
    font-weight: 500;
}

.info-content small {
    color: #888;
    font-size: 0.8rem;
}

.discord-guide {
    background: linear-gradient(135deg, #2d2d2d, #252525);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 25px;
}

.discord-guide h3 {
    color: #e0e0e0;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.guide-steps {
    display: grid;
    gap: 20px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #1a1a1a;
    border-radius: 8px;
    border: 1px solid #333;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #5865f2;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content h4 {
    color: #e0e0e0;
    margin-bottom: 5px;
    font-size: 1rem;
}

.step-content p {
    color: #ccc;
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Notification Settings Styles */
.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.notifications-header h2 {
    color: #e0e0e0;
    font-size: 1.8rem;
}

.notifications-actions {
    display: flex;
    gap: 10px;
}

.notifications-table {
    width: 100%;
    border-collapse: collapse;
    background: #2d2d2d;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

.notifications-table th,
.notifications-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #333;
}

.notifications-table th {
    background: #333;
    color: #e0e0e0;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.notifications-table td {
    color: #f5f5f5;
    font-size: 0.9rem;
}

.notifications-table tbody tr:hover {
    background: #3a3a3a;
}

.global-notification-settings {
    background: linear-gradient(135deg, #2d2d2d, #252525);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 25px;
}

.global-notification-settings h3 {
    color: #e0e0e0;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

/* Notification History Styles */
.notification-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.notification-history-header h2 {
    color: #e0e0e0;
    font-size: 1.8rem;
}

.history-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.notification-history-table {
    width: 100%;
    border-collapse: collapse;
    background: #2d2d2d;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

.notification-history-table th,
.notification-history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #333;
    font-size: 0.85rem;
}

.notification-history-table th {
    background: #333;
    color: #e0e0e0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.notification-history-table td {
    color: #f5f5f5;
}

.notification-history-table tbody tr:hover {
    background: #3a3a3a;
}

.notification-stats {
    background: linear-gradient(135deg, #2d2d2d, #252525);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 25px;
}

.notification-stats h3 {
    color: #e0e0e0;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

/* Status indicators for Discord */
.discord-status .status-dot.connected {
    background: #4caf50;
}

.discord-status .status-dot.disconnected {
    background: #f44336;
}

.discord-status .status-dot.testing {
    background: #ff9800;
}

/* Toggle switches for notifications */
.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: #333;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #4caf50;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* Notification type badges */
.notification-type-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.notification-type-badge.spawn-alert {
    background: #ff9800;
    color: white;
}

.notification-type-badge.spawn-now {
    background: #4caf50;
    color: white;
}

.notification-type-badge.both {
    background: #2196f3;
    color: white;
}

/* Responsive adjustments for Discord and notifications */
@media (max-width: 768px) {
    .discord-header,
    .notifications-header,
    .notification-history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .discord-status,
    .notifications-actions {
        width: 100%;
        justify-content: center;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .history-filters {
        width: 100%;
        justify-content: center;
    }
    
    .guide-steps {
        gap: 15px;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        align-self: center;
    }
}

/* Discord Templates Styles */
.discord-templates-header {
    margin-bottom: 30px;
}

.discord-templates-header h2 {
    color: #ff6b6b;
    margin-bottom: 10px;
}

.section-description {
    color: #b0b0b0;
    font-size: 0.95rem;
}

/* Template Input Container */
.template-input-container {
    position: relative;
}

.template-input-container .form-textarea {
    margin-bottom: 10px;
}

/* Placeholder Buttons */
.placeholder-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.placeholder-btn {
    background: #4a5568;
    color: #e2e8f0;
    border: 1px solid #718096;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.placeholder-btn:hover {
    background: #5a67d8;
    border-color: #667eea;
    color: #ffffff;
    transform: translateY(-1px);
}

.placeholder-btn:active {
    transform: translateY(0);
}

/* Template Tabs */
.template-tabs {
    display: flex;
    border-bottom: 2px solid #4a5568;
    margin-bottom: 20px;
}

.template-tab {
    background: transparent;
    border: none;
    color: #a0aec0;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.template-tab:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.05);
}

.template-tab.active {
    color: #5a67d8;
    border-bottom-color: #5a67d8;
}

.template-panel {
    display: none;
}

.template-panel.active {
    display: block;
}

.template-management {
    margin-bottom: 30px;
}

.template-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.template-list h3 {
    color: #f5f5f5;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.template-card {
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.template-card:hover {
    border-color: #ff6b6b;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.2);
}

.template-card.active {
    border-color: #4CAF50;
    background: #2a3d2a;
}

.template-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.template-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f5f5f5;
    margin: 0;
}

.template-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: #4CAF50;
}

.template-details {
    margin-bottom: 15px;
}

.template-detail {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.template-detail-label {
    color: #b0b0b0;
}

.template-detail-value {
    color: #f5f5f5;
    font-weight: 500;
}

.template-actions-card {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.template-actions-card .btn {
    font-size: 0.85rem;
    padding: 6px 12px;
}

.template-editor {
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.template-editor h3 {
    color: #ff6b6b;
    margin-bottom: 20px;
}

.form-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #252525;
    border-radius: 6px;
    border: 1px solid #333;
}

.form-section h4 {
    color: #f5f5f5;
    margin-bottom: 15px;
    font-size: 1rem;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #f5f5f5;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #ff6b6b;
}

.checkbox-label:hover {
    color: #ff6b6b;
}

.template-preview {
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.template-preview h3 {
    color: #ff6b6b;
    margin-bottom: 20px;
}

.preview-container {
    background: #36393f;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.discord-embed-preview {
    background: #2f3136;
    border-left: 4px solid #7289da;
    border-radius: 4px;
    padding: 16px;
    font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    max-width: 520px;
}

.embed-author {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.embed-author-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 8px;
}

.embed-author-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.embed-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.375;
}

.embed-description {
    font-size: 14px;
    color: #dcddde;
    margin-bottom: 8px;
    line-height: 1.375;
}

.embed-field {
    margin-bottom: 8px;
}

.embed-field-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 2px;
}

.embed-field-value {
    font-size: 14px;
    color: #dcddde;
    line-height: 1.375;
    white-space: pre-line;
}

.embed-footer {
    display: flex;
    align-items: center;
    margin-top: 8px;
    font-size: 12px;
    color: #72767d;
}

.embed-footer-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 8px;
}

.embed-timestamp {
    margin-left: 4px;
}

.preview-actions {
    display: flex;
    gap: 15px;
}

/* Color preview for template cards */
.template-color-preview {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #555;
    display: inline-block;
    margin-left: 10px;
}

/* Loading states */
.template-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #b0b0b0;
}

.template-loading i {
    margin-right: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Empty state */
.templates-empty {
    text-align: center;
    padding: 40px;
    color: #b0b0b0;
}

.templates-empty i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #555;
}

.templates-empty h4 {
    margin-bottom: 10px;
    color: #f5f5f5;
}

/* Discord Message Preview */
.discord-message-preview {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    background: #36393f;
    border-radius: 8px;
    margin-top: 10px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.discord-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #7289da;
    margin-right: 15px;
    flex-shrink: 0;
    position: relative;
}

.discord-avatar::before {
    content: "🤖";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
}

.discord-content {
    flex: 1;
    color: #dcddde;
}

.discord-username {
    font-weight: 600;
    color: #7289da;
    margin-bottom: 5px;
    font-size: 16px;
}

.discord-message {
    color: #dcddde;
    line-height: 1.4;
    font-size: 14px;
}

.no-preview {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Responsive adjustments for templates */
@media (max-width: 768px) {
    .templates-grid {
        grid-template-columns: 1fr;
    }
    
    .template-actions {
        flex-direction: column;
    }
    
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
}

/* User Management Styles */
.users-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

.users-header h2 {
    color: #e0e0e0;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.users-actions {
    display: flex;
    gap: 10px;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    background: #2d2d2d;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

.users-table th,
.users-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #333;
}

.users-table th {
    background: #333;
    color: #e0e0e0;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.users-table td {
    color: #f5f5f5;
    font-size: 0.9rem;
}

.users-table tbody tr:hover {
    background: #3a3a3a;
}

.user-stats {
    margin-bottom: 30px;
}

.user-stats h3 {
    color: #e0e0e0;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.recent-actions {
    background: linear-gradient(135deg, #2d2d2d, #252525);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 25px;
}

.actions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.actions-header h3 {
    color: #e0e0e0;
    font-size: 1.3rem;
    margin: 0;
}

.actions-table {
    width: 100%;
    border-collapse: collapse;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
}

.actions-table th,
.actions-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #333;
    font-size: 0.85rem;
}

.actions-table th {
    background: #333;
    color: #e0e0e0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.actions-table td {
    color: #f5f5f5;
}

.actions-table tbody tr:hover {
    background: #2a2a2a;
}

/* Role badges */
.role-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 2px;
}

.role-badge.super_admin {
    background: #ff4757;
    color: white;
}

.role-badge.boss_manager {
    background: #3742fa;
    color: white;
}

.role-badge.discord_sender {
    background: #2ed573;
    color: white;
}

.role-badge.viewer {
    background: #747d8c;
    color: white;
}

/* User status badges */
.user-status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-status-badge.active {
    background: #4caf50;
    color: white;
}

.user-status-badge.inactive {
    background: #f44336;
    color: white;
}

/* Roles container in modal */
.roles-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 15px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    margin-bottom: 15px;
}

.role-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.role-checkbox:hover {
    background: #2a2a2a;
}

.role-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #ff6b6b;
}

.role-checkbox label {
    color: #f5f5f5;
    font-size: 0.9rem;
    cursor: pointer;
    margin: 0;
}

.role-checkbox .role-description {
    font-size: 0.8rem;
    color: #888;
    margin-left: 28px;
    margin-top: 2px;
}

/* Action type badges */
.action-badge {
    display: inline-block;
    padding: 3px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.action-badge.boss {
    background: #ff6b6b;
    color: white;
}

.action-badge.discord {
    background: #5865f2;
    color: white;
}

.action-badge.user {
    background: #4caf50;
    color: white;
}

.action-badge.system {
    background: #9c27b0;
    color: white;
}

/* Responsive adjustments for user management */
@media (max-width: 768px) {
    .users-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .users-actions {
        width: 100%;
        justify-content: center;
    }
    
    .roles-container {
        grid-template-columns: 1fr;
    }
    
    .actions-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .user-stats .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}