:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #334155;
    --bg-input: #475569;
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: #475569;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 15px 50px rgba(0, 0, 0, 0.4);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #0c0f1a 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

.navbar {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #1a2238 100%);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-brand {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 200px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo i {
    font-size: 2rem;
    color: var(--primary);
    filter: drop-shadow(0 2px 8px rgba(59, 130, 246, 0.4));
}

.logo h1 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.logo span {
    color: var(--primary-light);
    font-weight: 600;
}

.nav-subtitle {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: none;
}

.nav-tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(30, 41, 59, 0.8);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
}

.tab-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    white-space: nowrap;
}

.tab-btn .tab-text {
    display: inline;
}

.tab-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-light);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    order: 2;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(30, 41, 59, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.member-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: rgba(30, 41, 59, 0.8);
    border-radius: 20px;
    border: 1px solid var(--border);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.main-content {
    flex: 1;
    padding: 1.5rem;
    width: 100%;
    overflow-x: hidden;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
    width: 100%;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dashboard-header {
    margin-bottom: 1.5rem;
}

.welcome-section {
    margin-bottom: 1.5rem;
}

.welcome-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.welcome-section p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.stat-card:hover {
    border-color: var(--primary);
}

.stat-card.blue { border-left: 4px solid var(--primary); }
.stat-card.green { border-left: 4px solid var(--success); }
.stat-card.purple { border-left: 4px solid var(--secondary); }
.stat-card.orange { border-left: 4px solid var(--warning); }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-card.blue .stat-icon { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); }
.stat-card.green .stat-icon { background: linear-gradient(135deg, var(--success) 0%, #0d9488 100%); }
.stat-card.purple .stat-icon { background: linear-gradient(135deg, var(--secondary) 0%, #7c3aed 100%); }
.stat-card.orange .stat-icon { background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%); }

.stat-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.content-left, .content-right {
    width: 100%;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    margin-bottom: 1.5rem;
    width: 100%;
}

.card:hover {
    border-color: var(--primary);
}

.card-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #273148 100%);
}

.card-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.card-header p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.card-body {
    padding: 1.25rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.modern-input, .modern-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
    background: var(--bg-input);
    transition: var(--transition);
    color: var(--text-primary);
    width: 100%;
}

.modern-input:focus, .modern-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.modern-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23cbd5e1' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

.btn {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #0d9488 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
}

.btn-lg {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.form-actions {
    margin-top: 1rem;
}

.party-selector {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-direction: column;
}

.party-selector .modern-select {
    flex: 1;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box.mini-search {
    margin-bottom: 1rem;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    background: var(--bg-input);
    transition: var(--transition);
    color: var(--text-primary);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.dashboard-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
}

.dashboard-member-card {
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    text-align: center;
}

.dashboard-member-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.dashboard-member-card.in-party {
    opacity: 0.6;
    cursor: not-allowed;
    border-color: var(--success);
}

.dashboard-member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid;
}

.dashboard-member-avatar.online { border-color: var(--success); }
.dashboard-member-avatar.idle { border-color: var(--warning); }
.dashboard-member-avatar.dnd { border-color: var(--danger); }
.dashboard-member-avatar.offline { border-color: var(--border); }

.dashboard-member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dashboard-member-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
}

.dashboard-member-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 0.25rem;
}

.dashboard-member-status.online { background: var(--success); }
.dashboard-member-status.idle { background: var(--warning); }
.dashboard-member-status.dnd { background: var(--danger); }
.dashboard-member-status.offline { background: var(--text-muted); }

.party-info-display {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #273148 100%);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.slots-container {
    margin-bottom: 1rem;
}

.slots-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.slots-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.party-actions {
    display: flex;
    gap: 0.5rem;
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.slot-item {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    transition: var(--transition);
    position: relative;
    min-height: 120px;
    display: flex;
    flex-direction: column;
}

.slot-item:hover {
    border-color: var(--primary);
}

.slot-item.filled {
    border-color: var(--success);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.slot-role {
    font-weight: 600;
    color: var(--primary-light);
    font-size: 0.75rem;
}

.slot-number {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.member-in-slot {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.small-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid;
    flex-shrink: 0;
}

.small-avatar.online { border-color: var(--success); }
.small-avatar.idle { border-color: var(--warning); }
.small-avatar.dnd { border-color: var(--danger); }
.small-avatar.offline { border-color: var(--border); }

.small-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slot-member-info {
    flex: 1;
    min-width: 0;
}

.slot-member-name {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.job-select {
    width: 100%;
    padding: 0.25rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.75rem;
    background: var(--bg-input);
    color: var(--text-primary);
    cursor: pointer;
}

.remove-member {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--danger);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    cursor: pointer;
    opacity: 0.8;
    transition: var(--transition);
}

.remove-member:hover {
    opacity: 1;
    transform: scale(1.1);
}

.empty-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex: 1;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
    padding: 0.5rem;
}

.empty-slot i {
    font-size: 1.5rem;
    opacity: 0.5;
}

.setup-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.setup-actions .btn {
    flex: 1;
    min-width: 120px;
}

.tab-header {
    margin-bottom: 1.5rem;
}

.tab-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.tab-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.party-controls, .members-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.filter-controls {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    flex-wrap: wrap;
}

.filter-controls .modern-select {
    flex: 1;
    min-width: 140px;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    width: 100%;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border);
    border-radius: 20px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
    min-width: 100px;
    text-align: center;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.parties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    width: 100%;
}

.party-preview-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.party-preview-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.party-preview-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.party-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.party-preview-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.party-preview-count {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

.party-preview-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.party-preview-raid {
    font-size: 0.9rem;
    color: var(--primary-light);
    font-weight: 500;
}

.party-preview-difficulty {
    font-size: 0.85rem;
    color: var(--warning);
    font-weight: 500;
}

.party-preview-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.party-preview-slot {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
}

.party-preview-slot.filled {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-color: var(--success);
    padding: 0.5rem;
    min-height: 70px;
}

.preview-slot-role {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.7rem;
}

.preview-slot-member {
    font-size: 0.7rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: left;
}

.party-preview-profile {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    margin-bottom: 1rem;
    display: none;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid var(--border);
}

.party-preview-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary);
}

.party-preview-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.party-preview-members {
    flex: 1;
}

.party-preview-member-name {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.party-preview-member-discord {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.party-preview-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.preview-action-btn {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.preview-action-btn.setup {
    background: var(--primary);
    color: white;
}

.preview-action-btn.edit {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.preview-action-btn.delete {
    background: var(--danger);
    color: white;
}

.preview-action-btn.view {
    background: var(--success);
    color: white;
}

.preview-action-btn:hover {
    transform: translateY(-2px);
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    width: 100%;
}

.member-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.member-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.member-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.member-card.online::before { background: var(--success); }
.member-card.idle::before { background: var(--warning); }
.member-card.dnd::before { background: var(--danger); }
.member-card.offline::before { background: var(--text-muted); }

.member-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.member-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid;
    flex-shrink: 0;
}

.member-avatar.online { border-color: var(--success); }
.member-avatar.idle { border-color: var(--warning); }
.member-avatar.dnd { border-color: var(--danger); }
.member-avatar.offline { border-color: var(--border); }

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-info {
    flex: 1;
    min-width: 0;
}

.member-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-discord {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.member-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.member-status.online { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.member-status.idle { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.member-status.dnd { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.member-status.offline { background: rgba(148, 163, 184, 0.2); color: var(--text-muted); }

.member-details {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    border: 1px solid var(--border);
}

.member-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.member-detail-item:last-child {
    border-bottom: none;
}

.member-detail-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.member-detail-value {
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 600;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.4s ease;
    overflow: hidden;
    border: 1px solid var(--border);
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #1a2238 100%);
    color: var(--text-primary);
    position: relative;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.member-name {
    font-weight: 600;
    color: var(--success);
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.5rem;
}

.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.75rem;
}

.slot-option {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.slot-option:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.slot-option.filled {
    opacity: 0.6;
    cursor: not-allowed;
    border-color: var(--border);
    background: var(--bg-secondary);
}

.slot-option.filled:hover {
    transform: none;
    border-color: var(--border);
}

.slot-option-role {
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
}

.slot-option-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.slot-option-member {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: var(--bg-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.25rem;
}

.modal-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.footer {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #1a2238 100%);
    color: var(--text-primary);
    padding: 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--primary-light);
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.status-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.status-item .status-dot {
    width: 6px;
    height: 6px;
}

.footer-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.footer-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    min-width: 160px;
    justify-content: center;
}

.footer-btn:hover {
    background: var(--primary);
    color: white;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-card);
    border-left: 4px solid;
    border-radius: var(--radius-sm);
    padding: 1rem;
    min-width: 280px;
    max-width: 90%;
    box-shadow: var(--shadow-lg);
    z-index: 3000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideInRight 0.3s ease;
    border: 1px solid var(--border);
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: var(--transition);
}

.toast-close:hover {
    background: var(--bg-input);
}

.slot-member-display {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.slot-member-avatar-small {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary);
    flex-shrink: 0;
}

.slot-member-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slot-member-info-small {
    flex: 1;
    min-width: 0;
}

.slot-member-name-small {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slot-member-discord-small {
    font-size: 0.65rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.activity-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    flex: 1;
}

.activity-stat {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.activity-stat:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.activity-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    background: linear-gradient(135deg, var(--secondary) 0%, #7c3aed 100%);
}

.activity-stat-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.activity-stat-info p {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.activity-actions {
    display: flex;
    gap: 0.75rem;
}

.activity-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .activity-content {
        grid-template-columns: 1fr 1fr;
    }
}

.live-viewers-card, .activity-log-card {
    height: 100%;
}

.viewers-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.viewer-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 1rem;
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.viewer-card:hover {
    border-color: var(--primary);
    transform: translateX(5px);
}

.viewer-card.current-user {
    border-color: var(--success);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.viewer-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.viewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid;
    position: relative;
    flex-shrink: 0;
}

.viewer-avatar.online {
    border-color: var(--success);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.viewer-avatar.idle {
    border-color: var(--warning);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.viewer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.you-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: var(--success);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    border: 2px solid var(--bg-secondary);
}

.viewer-info {
    flex: 1;
    min-width: 0;
}

.viewer-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}

.viewer-discord {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.viewer-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.viewer-status .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.viewer-status .status-dot.online {
    background: var(--success);
    box-shadow: 0 0 5px var(--success);
}

.viewer-status .status-dot.idle {
    background: var(--warning);
    box-shadow: 0 0 5px var(--warning);
}

.status-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.viewer-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.viewer-detail {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.detail-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.detail-value {
    font-size: 0.75rem;
    color: var(--text-primary);
    font-weight: 500;
}

.detail-value.identified {
    color: var(--success);
}

.detail-value.guest {
    color: var(--warning);
}

.viewer-activity {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(148, 163, 184, 0.1);
}

.activity-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    transition: width 0.5s ease;
}

.activity-log {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.log-entry {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--info);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.log-entry.success {
    border-left-color: var(--success);
}

.log-entry.error {
    border-left-color: var(--danger);
}

.log-entry.warning {
    border-left-color: var(--warning);
}

.log-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    min-width: 60px;
}

.log-message {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-primary);
}

.log-user {
    font-size: 0.7rem;
    color: var(--text-secondary);
    background: var(--bg-input);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
}

.identify-members {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.identify-member {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.identify-member:hover {
    border-color: var(--primary);
    background: var(--bg-card);
}

.identify-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid;
}

.identify-avatar.online {
    border-color: var(--success);
}

.identify-avatar.idle {
    border-color: var(--warning);
}

.identify-avatar.dnd {
    border-color: var(--danger);
}

.identify-avatar.offline {
    border-color: var(--border);
}

.identify-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.identify-info {
    flex: 1;
}

.identify-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.identify-discord {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.identify-status {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.identify-status.online {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.identify-status.idle {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.identify-status.dnd {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.identify-status.offline {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-muted);
}

.identify-check {
    color: var(--success);
    font-size: 1rem;
}

.slot-member-discord {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.1rem;
}

.status-update {
    animation: pulse 1s ease;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 1; }
}

.member-avatar.online {
    border-color: var(--success);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    transition: all 0.3s ease;
}

.member-avatar.idle {
    border-color: var(--warning);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
    transition: all 0.3s ease;
}

.member-avatar.dnd {
    border-color: var(--danger);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    transition: all 0.3s ease;
}

.member-avatar.offline {
    border-color: var(--border);
    box-shadow: none;
    transition: all 0.3s ease;
}

.status-badge.online .status-dot {
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.realtime-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
    border: 2px solid var(--bg-card);
    z-index: 1;
}

.party-schedule {
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    margin: 0.75rem 0;
    border: 1px solid rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.schedule-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.schedule-info {
    flex: 1;
}

.schedule-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 0.25rem;
}

.schedule-time {
    font-size: 0.85rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.schedule-time i {
    color: var(--primary);
    font-size: 0.8rem;
}

.schedule-remaining {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.schedule-remaining.upcoming {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.schedule-remaining.soon {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.schedule-remaining.today {
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary);
}

.schedule-remaining.expired {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.schedule-remaining i {
    font-size: 0.7rem;
}

.party-preview-schedule {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    margin: 0.75rem 0;
    border: 1px solid var(--border);
}

.schedule-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
}

.schedule-row:last-child {
    margin-bottom: 0;
}

.schedule-row i {
    color: var(--primary);
    font-size: 0.75rem;
    width: 16px;
    text-align: center;
}

.schedule-label {
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 70px;
}

.schedule-time {
    color: var(--text-primary);
    font-weight: 500;
}

.schedule-remaining {
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
}

.schedule-remaining.upcoming {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.schedule-remaining.soon {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.schedule-remaining.today {
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary);
}

.schedule-remaining.expired {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.no-schedule {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    justify-content: center;
    padding: 0.5rem;
}

.no-schedule i {
    font-size: 0.9rem;
}

.party-schedule-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.party-schedule-badge.scheduled {
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.party-schedule-badge.upcoming {
    background: rgba(139, 92, 246, 0.2);
    color: var(--secondary);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.party-schedule-badge.today {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.party-schedule-badge.soon {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.party-schedule-badge.expired {
    background: rgba(100, 116, 139, 0.2);
    color: var(--text-muted);
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.party-schedule-badge i {
    font-size: 0.6rem;
}

.recent-party-schedule {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recent-party-schedule::before {
    content: '📅';
    font-size: 0.7rem;
}

.recent-party-schedule.no-schedule {
    color: var(--text-muted);
}

.recent-party-schedule.no-schedule::before {
    content: '📅❌';
}

.recent-party-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.recent-party-count {
    background: var(--bg-input);
    color: var(--text-primary);
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.party-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.party-preview-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
}

.party-preview-count {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
    order: 2;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.modern-input[type="datetime-local"] {
    font-family: 'Poppins', sans-serif;
    padding: 0.75rem 1rem;
}

.modern-input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    background-color: var(--primary);
    padding: 0.3rem;
    border-radius: 4px;
    cursor: pointer;
    filter: invert(1);
}

.modern-input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper {
    color: var(--text-primary);
}

.modern-input[type="datetime-local"]::-webkit-datetime-edit-text {
    color: var(--text-primary);
}

.modern-input[type="datetime-local"]::-webkit-datetime-edit-month-field,
.modern-input[type="datetime-local"]::-webkit-datetime-edit-day-field,
.modern-input[type="datetime-local"]::-webkit-datetime-edit-year-field,
.modern-input[type="datetime-local"]::-webkit-datetime-edit-hour-field,
.modern-input[type="datetime-local"]::-webkit-datetime-edit-minute-field {
    color: var(--text-primary);
}

@keyframes schedulePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.schedule-remaining.soon,
.party-schedule-badge.soon {
    animation: schedulePulse 2s infinite;
}

.member-detail-item.full-width {
    grid-column: 1 / -1;
}

.roles-value, .about-value, .status-value, .tags-value {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    max-height: 60px;
    overflow-y: auto;
    padding: 2px;
}

.status-emoji {
    font-size: 0.9rem;
}

.about-value {
    background: var(--bg-input);
    border-radius: 4px;
    padding: 0.5rem;
    border: 1px solid var(--border);
    min-height: 40px;
    max-height: 80px;
    overflow-y: auto;
    font-style: italic;
    color: var(--text-secondary);
}

.tags-value {
    display: inline-flex;
    gap: 4px;
    flex-wrap: wrap;
}

.tags-value span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.about-value::-webkit-scrollbar {
    width: 4px;
}

.about-value::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.roles-value::-webkit-scrollbar {
    width: 4px;
}

.roles-value::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.party-type {
    background: linear-gradient(135deg, var(--secondary) 0%, #7c3aed 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 0.5rem;
}

.party-preview-type {
    font-size: 0.85rem;
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.party-details {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.recent-party-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

@keyframes fadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.95); }
}

.party-preview-card.deleting {
    animation: fadeOut 0.3s ease forwards;
    pointer-events: none;
}

.preview-action-btn.delete {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
    border: none;
}

.preview-action-btn.delete:hover {
    background: linear-gradient(135deg, #dc2626 0%, var(--danger) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.preview-action-btn.delete:active {
    transform: translateY(0);
}

.delete-confirmation-modal .modal-content {
    max-width: 400px;
}

.delete-confirmation-text {
    text-align: center;
    margin: 1rem 0;
    color: var(--text-primary);
}

.party-name-to-delete {
    font-weight: 600;
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    margin: 0.5rem 0;
    display: block;
}

/* Lucky Zone Styles */
.luckyzone-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1rem;
    border: 1px solid var(--border);
}

.timezone-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.timezone-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.next-change-info {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
}

.next-change-info span {
    color: var(--warning);
    font-weight: 600;
}

.date-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.current-date-display {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    min-width: 120px;
    text-align: center;
    border: 1px solid var(--border);
}

.date-day {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-light);
}

.date-month-year {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.luckyzone-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .luckyzone-content {
        grid-template-columns: 1fr 1fr;
    }
}

.luckyzone-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.luckyzone-card-item {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #273148 100%);
    border-radius: var(--radius);
    padding: 1.25rem;
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.luckyzone-card-item:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.luckyzone-card-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--warning) 0%, var(--danger) 100%);
}

.luckyzone-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.luckyzone-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--warning) 0%, var(--danger) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.luckyzone-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.luckyzone-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 0.5rem;
}

.luckyzone-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.schedule-table-container {
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.schedule-table thead {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #1a2238 100%);
    position: sticky;
    top: 0;
    z-index: 10;
}

.schedule-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    color: var(--text-primary);
    font-weight: 600;
    border-bottom: 2px solid var(--border);
}

.schedule-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.schedule-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.1);
}

.schedule-table tbody tr.current {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
    border-left: 3px solid var(--success);
}

.schedule-table td {
    padding: 0.75rem 1rem;
    color: var(--text-primary);
}

.schedule-date {
    font-weight: 600;
    color: var(--primary-light);
    width: 60px;
}

.schedule-zone {
    color: var(--text-secondary);
}

/* Responsive styles */
@media (max-width: 768px) {
    .luckyzone-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .timezone-info {
        justify-content: space-between;
    }
    
    .date-selector {
        justify-content: center;
    }
    
    .luckyzone-grid {
        grid-template-columns: 1fr;
    }
    
    .schedule-table {
        font-size: 0.8rem;
    }
    
    .schedule-table th,
    .schedule-table td {
        padding: 0.5rem;
    }
}

@media (min-width: 640px) {
    .nav-subtitle {
        display: block;
    }
    
    .nav-tabs {
        order: 2;
        width: auto;
        margin-top: 0;
    }
    
    .nav-status {
        order: 3;
    }
    
    .mobile-menu-btn {
        display: none;
    }
    
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .party-selector {
        flex-direction: row;
    }
    
    .dashboard-members-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .slots-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
    
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
        text-align: left;
    }
    
    .footer-section h4 {
        justify-content: flex-start;
    }
    
    .footer-actions {
        align-items: flex-start;
    }
    
    .status-list {
        align-items: flex-start;
    }
}

@media (min-width: 768px) {
    .navbar {
        padding: 1.2rem 2rem;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .logo i {
        font-size: 2.5rem;
    }
    
    .tab-btn {
        padding: 0.75rem 1.5rem;
    }
    
    .main-content {
        padding: 2rem;
    }
    
    .welcome-section h2 {
        font-size: 2rem;
    }
    
    .dashboard-content {
        flex-direction: row;
        gap: 2rem;
    }
    
    .content-left {
        flex: 1;
    }
    
    .content-right {
        flex: 1;
    }
    
    .card {
        margin-bottom: 2rem;
    }
    
    .slots-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .party-controls, .members-controls {
        flex-direction: row;
        align-items: center;
    }
    
    .search-box {
        max-width: 300px;
    }
    
    .filter-tabs {
        width: auto;
    }
    
    .filter-btn {
        flex: none;
    }
}

@media (min-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-members-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    
    .slots-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .parties-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
    
    .members-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 480px) {
    .tab-btn .tab-text {
        display: none;
    }
    
    .tab-btn {
        padding: 0.5rem;
        min-width: 40px;
        justify-content: center;
    }
    
    .status-badge span,
    .member-counter span {
        font-size: 0.75rem;
    }
    
    .slots-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .party-actions {
        width: 100%;
    }
    
    .setup-actions .btn {
        min-width: 100%;
    }
    
    .preview-action-btn span {
        display: none;
    }
    
    .preview-action-btn {
        padding: 0.5rem;
        min-width: 40px;
        justify-content: center;
    }
}

@media (max-width: 320px) {
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .logo i {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .slots-grid {
        grid-template-columns: 1fr;
    }
    
    .party-preview-slots {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .members-grid {
        grid-template-columns: 1fr;
    }
}

@media (hover: none) and (pointer: coarse) {
    .tab-btn:hover,
    .btn:hover,
    .slot-item:hover,
    .member-card:hover,
    .party-preview-card:hover,
    .dashboard-member-card:hover {
        transform: none;
    }
    
    .tab-btn:active,
    .btn:active,
    .slot-item:active,
    .member-card:active,
    .party-preview-card:active,
    .dashboard-member-card:active {
        transform: scale(0.98);
    }
    
    .remove-member,
    .member-action {
        opacity: 1;
    }
}

.tab-btn, .btn, .action-btn, .filter-btn, .footer-btn, .preview-action-btn {
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}