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

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f6f1ea;
    color: #2d2520;
}

/* LOGIN */
.login-body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #fff8f1, #f4d8c1, #e8c3a6);
}

#particles-js {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.gold-particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, #fff6b7, #d4af37, transparent);
    opacity: .8;
    animation: goldFloat linear infinite;
    box-shadow: 0 0 12px rgba(212, 175, 55, .9);
}

@keyframes goldFloat {
    0% {
        transform: translateY(40vh) scale(.4);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: translateY(-120vh) scale(1);
        opacity: 0;
    }
}

.login-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.login-card {
    width: 420px;
    padding: 45px;
    border-radius: 30px;
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, .3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .15);
    animation: fadeUp 1s ease;
}

.logo-area {
    text-align: center;
    margin-bottom: 40px;
}

.logo-area h1 {
    font-size: 34px;
    color: #8b5e3c;
}

.logo-area p {
    color: #666;
}

.input-group {
    position: relative;
    margin-bottom: 25px;
}

.input-group input {
    width: 100%;
    padding: 18px;
    border: none;
    outline: none;
    border-radius: 15px;
    background: rgba(255, 255, 255, .85);
}

.input-group label {
    position: absolute;
    left: 18px;
    top: 18px;
    color: #777;
    transition: .3s;
    pointer-events: none;
}

.input-group input:focus + label,
.input-group input:valid + label {
    top: -12px;
    left: 12px;
    background: white;
    padding: 0 10px;
    font-size: 12px;
}

.login-card button {
    width: 100%;
    border: none;
    padding: 16px;
    border-radius: 15px;
    background: linear-gradient(135deg, #c49b6a, #8b5e3c);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: .4s;
}

.login-card button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, .15);
}

.error {
    background: #ffe0e0;
    color: #9b1c1c;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 15px;
    text-align: center;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ADMIN LAYOUT */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 270px;
    background: linear-gradient(180deg, #2d201a, #5a3425);
    color: white;
    padding: 25px;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
}

.brand {
    margin-bottom: 35px;
}

.brand h2 {
    font-size: 25px;
    margin-bottom: 6px;
}

.brand span {
    font-size: 14px;
    opacity: .75;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.sidebar nav a {
    color: white;
    text-decoration: none;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .08);
    transition: .3s;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: #d9a679;
    color: #2d201a;
}

.sidebar nav a.logout {
    margin-top: 30px;
    background: rgba(220, 38, 38, .18);
    color: #ffb4b4;
    border: 1px solid rgba(255, 80, 80, .15);
}

.sidebar nav a.logout:hover {
    background: #dc2626;
    color: white;
    transform: translateX(5px);
    box-shadow: 0 10px 25px rgba(220, 38, 38, .35);
}

.sidebar-brand-card {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
    border: 1px solid rgba(255, 255, 255, .08);
    backdrop-filter: blur(10px);
}

.sidebar-brand-card img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    background: white;
    padding: 4px;
}

.sidebar-brand-info h4 {
    margin: 0;
    color: white;
    font-size: 16px;
    font-weight: 600;
}

.sidebar-brand-info span {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: rgba(255, 255, 255, .65);
    font-weight: 400;
}

.content {
    margin-left: 270px;
    padding: 35px;
    width: calc(100% - 270px);
}

.top-title {
    margin-bottom: 25px;
}

.top-title h1 {
    font-size: 34px;
    color: #3c2a22;
}

.top-title p {
    color: #7b6b61;
    margin-top: 5px;
}

/* CARDS */
.card {
    background: rgba(255, 255, 255, .9);
    border-radius: 24px;
    padding: 25px;
    box-shadow: 0 20px 50px rgba(75, 45, 25, .08);
    overflow-x: auto;
    margin-bottom: 25px;
}

.form-card h3 {
    margin-bottom: 15px;
}

.user-form {
    display: grid;
    grid-template-columns: 1fr 1fr 180px;
    gap: 12px;
}

.user-form input,
table input {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid #dfc7b7;
    border-radius: 12px;
    outline: none;
    background: #fff;
}

.user-form button,
.edit-btn {
    width: 100%;
    border: none;
    padding: 13px;
    border-radius: 12px;
    background: linear-gradient(135deg, #b9855d, #7c4a31);
    color: white;
    font-weight: 600;
    cursor: pointer;
}

/* TABLE */
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

table th {
    background: #f0dfd2;
    color: #4b3225;
    padding: 14px;
    text-align: left;
}

table td {
    padding: 13px;
    border-bottom: 1px solid #eee0d5;
}

table tr:hover {
    background: #fff8f2;
}

.delete-btn {
    display: inline-block;
    text-decoration: none;
    background: #ef0909;
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    margin-top: 8px;
}

/* USERS DESKTOP BUTTONS */
.kullanici-table-card td:last-child {
    white-space: nowrap;
}

.kullanici-table-card td:last-child form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kullanici-table-card .edit-btn {
    width: auto;
    min-width: 140px;
    margin: 0;
}

.kullanici-table-card .delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 70px;
    margin: 0;
    padding: 12px 18px;
}

/* EXPORT BUTTONS */
.top-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.excel-btn,
.pdf-btn {
    text-decoration: none;
    padding: 12px 18px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    transition: .3s;
}

.excel-btn {
    background: #198754;
}

.pdf-btn {
    background: #dc2626;
}

.excel-btn:hover {
    background: #157347;
    transform: translateY(-2px);
}

.pdf-btn:hover {
    background: #bb2d3b;
    transform: translateY(-2px);
}

/* ADMIN PROTECTED BUTTON */
.admin-protected {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 12px;
    background: #f0dfd2;
    color: #7c4a31;
    border: 1px solid #dfc7b7;
    font-weight: 600;
}

/* PAGINATION */
.pagination {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: 600;
}

.pagination a {
    text-decoration: none;
    background: white;
    border: 1px solid #ddd;
    color: #333;
    transition: .3s;
}

.pagination a:hover {
    background: #f5f5f5;
}

.pagination a.active {
    background: #8b5e3c;
    color: white;
    border-color:#8b5e3c;
}

.pagination span {
    color: #7b6b61;
}

/* MOBILE LISTS */
.mobile-topbar,
.sidebar-overlay,
.mobile-rsvp-list,
.mobile-user-list {
    display: none;
}

/* MOBILE RESPONSIVE (MAX-WIDTH: 768px) */
@media (max-width: 768px) {
    body {
        padding-top: 64px;
    }

    /* Sadece login arka planını dikeyde ortalanacak hale getiriyoruz */
    .login-body {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding-top: 0 !important;
        min-height: 100vh !important;
        height: 100dvh !important;
    }

    .login-card {
        width: calc(100% - 32px);
        padding: 35px 24px;
    }

    .mobile-topbar {
        display: flex;
        align-items: center;
        gap: 14px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 64px;
        padding: 0 18px;
        background: linear-gradient(135deg, #2d201a, #5a3425);
        color: white;
        z-index: 9999;
        box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
    }

    .mobile-topbar button {
        width: 42px;
        height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        border-radius: 12px;
        background: rgba(255, 255, 255, .14);
        color: white;
        font-size: 28px;
        line-height: 1;
        cursor: pointer;
        padding: 0;
        transform: translate(-2px, -2px);
    }

    .mobile-topbar span {
        font-size: 18px;
        font-weight: 700;
    }

    .admin-wrapper {
        display: block;
    }

    .sidebar {
        position: fixed !important;
        top: 64px;
        left: -100%;
        bottom: 0;
        width: 100%;
        max-width: 320px;
        height: calc(100vh - 64px);
        z-index: 9998;
        transition: left .35s ease;
        border-radius: 0 24px 0 0;
        overflow-y: auto;
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar nav {
        flex: none;
    }

    .sidebar-brand-card {
        margin-top: 15px !important;
    }

    .sidebar-overlay {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, .5);
        backdrop-filter: blur(5px);
        z-index: 9997;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 20px;
    }

    .top-title h1 {
        font-size: 26px;
    }

    .user-form {
        grid-template-columns: 1fr;
    }

    .top-actions {
        flex-direction: column;
        gap: 10px;
    }

    .excel-btn,
    .pdf-btn {
        width: 100%;
        text-align: center;
        padding: 14px;
        font-size: 15px;
    }

    .katilimci-table-card,
    .kullanici-table-card {
        display: none;
    }

    .mobile-rsvp-list,
    .mobile-user-list {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .rsvp-card,
    .user-card {
        background: white;
        border-radius: 20px;
        padding: 18px;
        border: 1px solid #eee;
        box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
    }

    .rsvp-header,
    .user-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
        padding-bottom: 12px;
        border-bottom: 1px solid #eee;
    }

    .rsvp-header h4,
    .user-header h4 {
        margin: 0;
        color: #4b3225;
        font-size: 17px;
    }

    .rsvp-header span,
    .user-header span {
        color: #888;
        font-size: 13px;
    }

    .rsvp-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 10px;
        gap: 10px;
    }

    .rsvp-row strong {
        color: #4b3225;
    }

    .rsvp-row span {
        text-align: right;
        color: #666;
    }

    .user-group {
        margin-bottom: 12px;
    }

    .user-group label {
        display: block;
        margin-bottom: 5px;
        font-size: 13px;
        color: #7a5540;
        font-weight: 600;
    }

    .user-card input {
        width: 100%;
        padding: 13px 15px;
        border: 1px solid #dfb497;
        border-radius: 12px;
        outline: none;
        background: #fffaf6;
        color: #3c2a22;
        font-size: 14px;
        margin-top: 6px;
    }

    .user-card input:focus {
        border-color: #b87443;
        box-shadow: 0 0 0 3px rgba(184, 116, 67, .15);
        background: white;
    }

    .rsvp-card .delete-btn,
    .user-card .delete-btn {
        display: block;
        width: 100%;
        text-align: center;
        margin-top: 15px;
        border-radius: 12px;
        padding: 13px;
    }

    .user-card .edit-btn {
        width: 100%;
        margin-top: 8px;
        margin-bottom: 10px;
        border-radius: 12px;
    }

    .admin-protected {
        display: flex;
        width: 100%;
        margin-top: 10px;
    }

    .pagination {
        justify-content: center;
        margin-top: 15px;
    }

    .pagination a,
    .pagination span {
        min-width: 36px;
        height: 36px;
        font-size: 14px;
    }
}