/* ===================================================
   PANEL GRACZA - STYLE
   =================================================== */

.panel-page-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 80px;
    background: rgba(5,5,5,0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 40px; z-index: 1000;
}

.panel-layout {
    display: flex;
    min-height: 100vh;
    padding-top: 120px;
    max-width: 1400px;
    margin: 0 auto;
    gap: 30px;
    padding-bottom: 50px;
    padding-left: 20px;
    padding-right: 20px;
}

/* SIDEBAR */
.sidebar {
    width: 280px; flex-shrink: 0;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px; padding: 20px;
    position: sticky; top: 100px;
    height: fit-content;
    backdrop-filter: blur(10px);
}

.user-info {
    display: flex; align-items: center; gap: 15px;
    margin-bottom: 30px; padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.user-name h4 { font-size: 1rem; color: white; margin-bottom: 2px; }
.user-name span { font-size: 0.8rem; color: #888; }

.sidebar-menu a {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 15px; color: #ccc; text-decoration: none;
    border-radius: 8px; transition: 0.3s;
    margin-bottom: 5px; font-weight: 500;
    border: 1px solid transparent;
}
.sidebar-menu a:hover, .sidebar-menu a.active {
    background: rgba(117,180,253,0.15); color: white;
    border-color: rgba(117,180,253,0.2);
}

/* CONTENT */
.panel-content { flex: 1; }

.panel-section { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.panel-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 30px;
}
.panel-title {
    font-family: 'Archivo Black', sans-serif;
    font-size: 2rem; color: white;
}

.btn-add-server {
    background: rgba(117,180,253,0.2);
    border: 1px solid rgba(117,180,253,0.4);
    color: white; padding: 10px 20px; border-radius: 8px;
    font-weight: 700; cursor: pointer; text-decoration: none;
    display: flex; align-items: center; gap: 8px;
    transition: 0.3s; font-family: inherit; font-size: 0.85rem;
}
.btn-add-server:hover {
    background: rgba(117,180,253,0.4);
    box-shadow: 0 0 20px rgba(117,180,253,0.2);
}

/* Server list */
.my-servers-list { display: grid; gap: 20px; }
.my-server-item {
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 20px; border-radius: 12px; transition: 0.3s;
    flex-wrap: wrap; gap: 15px;
}
.my-server-item:hover {
    border-color: rgba(117,180,253,0.3);
    background: rgba(255,255,255,0.05);
}
.server-mini-info { display: flex; align-items: center; gap: 15px; }
.server-mini-logo {
    width: 50px; height: 50px; background: rgba(0,0,0,0.3);
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    font-weight: bold; border: 1px solid rgba(255,255,255,0.1);
    font-size: 1rem; color: var(--accent, #75b4fd);
}
.server-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-action {
    padding: 8px 15px; border-radius: 6px; font-size: 0.85rem;
    font-weight: 600; text-decoration: none;
    border: 1px solid rgba(255,255,255,0.1); color: #ccc; transition: 0.3s;
}
.btn-action:hover { background: rgba(255,255,255,0.1); color: white; border-color: white; }

.empty-state {
    text-align: center; padding: 60px 20px;
    color: rgba(255,255,255,0.3);
}
.empty-state svg { margin-bottom: 15px; }
.empty-state p { font-size: 0.95rem; line-height: 1.6; }

/* Mobile */
@media (max-width: 768px) {
    .panel-layout { flex-direction: column; padding-top: 100px; }
    .sidebar { width: 100%; position: relative; top: 0; }
    .panel-page-header { padding: 0 20px; }
    .panel-title { font-size: 1.5rem; }
    .my-server-item { flex-direction: column; align-items: flex-start; }
}

/* ===================================================
   USER DROPDOWN W HEADERZE - pasuje do stylu strony
   =================================================== */
.user-dropdown { position: relative; }

.user-btn {
    display: flex; align-items: center; gap: 10px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff; padding: 7px 16px 7px 7px;
    border-radius: 40px; cursor: pointer;
    font-size: 0.85rem; font-weight: 600;
    font-family: inherit;
    transition: 0.3s;
}
.user-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
    box-shadow: 0 0 15px rgba(255,255,255,0.2);
}

.header-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.dropdown-menu {
    display: none;
    position: absolute; right: 0; top: calc(100% + 8px);
    background: #0e0e12;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px; min-width: 170px;
    overflow: hidden; z-index: 9999;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
.user-dropdown.open .dropdown-menu { display: block; }

.dropdown-menu a {
    display: block; padding: 11px 18px;
    color: rgba(255,255,255,0.7); text-decoration: none;
    font-size: 0.875rem; font-weight: 500;
    transition: 0.2s; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.dropdown-menu a:last-child { border-bottom: none; }
.dropdown-menu a:hover { background: rgba(255,255,255,0.07); color: #fff; }
.dropdown-menu .logout-link { color: rgba(255, 100, 100, 0.8); }
.dropdown-menu .logout-link:hover { color: #ff6b6b; background: rgba(255,80,80,0.08); }

/* ===================================================
   NOWY MODAL DODAWANIA SERWERA
   =================================================== */
.server-modal {
    max-width: 600px;
    width: 95%;
}

/* Zakładki */
.modal-tabs {
    display: flex;
    gap: 0;
    padding: 0 28px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.2);
}
.modal-tab {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    padding: 14px 20px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}
.modal-tab::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 2px;
    background: #75b4fd;
    border-radius: 2px 2px 0 0;
    opacity: 0;
    transition: opacity 0.2s;
}
.modal-tab.active { color: #fff; }
.modal-tab.active::after { opacity: 1; }
.modal-tab:hover { color: rgba(255,255,255,0.8); }

/* Tab content */
.modal-tab-content { display: none; }
.modal-tab-content.active { display: block; }

.modal-form-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 24px 28px;
}

/* Pola formularza */
.mf-field { display: flex; flex-direction: column; gap: 7px; }
.mf-field.full { grid-column: 1 / -1; }

.mf-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.mf-required { color: #75b4fd; }

.mf-hint {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.35);
    margin: 0;
    line-height: 1.4;
}

.mf-input {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    padding: 10px 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    width: 100%;
}
.mf-input::placeholder { color: rgba(255,255,255,0.2); }
.mf-input:focus {
    border-color: rgba(117,180,253,0.6);
    background: rgba(117,180,253,0.05);
    box-shadow: 0 0 0 3px rgba(117,180,253,0.1);
}
.mf-input:hover:not(:focus) {
    border-color: rgba(255,255,255,0.2);
}

.mf-textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}

/* Select */
.mf-select-wrap {
    position: relative;
}
.mf-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
    cursor: pointer;
}
.mf-select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.4);
    pointer-events: none;
}
.mf-select option { background: #111; }

/* Banner preview */
.mf-preview-box { grid-column: 1 / -1; }

/* Footer przycisków */
.modal-form-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 28px;
    border-top: 1px solid rgba(255,255,255,0.07);
    background: rgba(0,0,0,0.15);
}
.btn-next-tab {
    background: rgba(117,180,253,0.15);
    border: 1px solid rgba(117,180,253,0.3);
    color: #75b4fd;
    padding: 10px 22px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    letter-spacing: 0.03em;
}
.btn-next-tab:hover {
    background: rgba(117,180,253,0.25);
    box-shadow: 0 0 16px rgba(117,180,253,0.2);
}

/* Wskaźnik postępu */
.modal-progress {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-right: auto;
}
.modal-progress-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    transition: 0.3s;
}
.modal-progress-dot.active {
    background: #75b4fd;
    box-shadow: 0 0 8px rgba(117,180,253,0.5);
}

@media (max-width: 520px) {
    .modal-form-section { grid-template-columns: 1fr; }
    .mf-field.full { grid-column: 1; }
    .modal-tabs { padding: 0 16px; }
    .modal-form-section { padding: 18px 16px; }
    .modal-form-footer { padding: 14px 16px; }
}

/* ===================================================
   PRZYCISKI EDYTUJ / USUŃ W PANELU
   =================================================== */
.btn-panel-edit, .btn-panel-delete {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: 8px;
    font-family: 'Inter', sans-serif; font-size: 0.78rem; font-weight: 700;
    letter-spacing: 0.04em; cursor: pointer; transition: 0.2s;
}
.btn-panel-edit {
    background: rgba(117,180,253,0.08);
    border: 1px solid rgba(117,180,253,0.2);
    color: rgba(117,180,253,0.8);
}
.btn-panel-edit:hover {
    background: rgba(117,180,253,0.16);
    border-color: rgba(117,180,253,0.4);
    color: #75b4fd;
    box-shadow: 0 0 12px rgba(117,180,253,0.12);
}
.btn-panel-delete {
    background: rgba(255,80,80,0.06);
    border: 1px solid rgba(255,80,80,0.18);
    color: rgba(255,100,100,0.7);
}
.btn-panel-delete:hover {
    background: rgba(255,80,80,0.14);
    border-color: rgba(255,80,80,0.4);
    color: #ff6b6b;
    box-shadow: 0 0 12px rgba(255,80,80,0.1);
}
