html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

.content {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero {
    text-align: center;
    padding: 4rem 2rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.hero .tagline {
    font-size: 1.5rem;
    color: #7f8c8d;
    margin-bottom: 1rem;
}

.hero .date {
    font-size: 1.25rem;
    color: #34495e;
    font-weight: 600;
}

.invite {
    text-align: center;
    padding: 2rem;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MiAyNjYuNjA2IDUyLjI2NUwyNjYuNjA2IDUyLjI2NUwyODkuMzYxIDc0LjgzMkMyOTAuMTUgNzUuNjIyIDI5MC41IDc2LjcxMiAyOTAuNSA3Ny44MDNDMjkwLjUgNzguODkzIDI5MC4xNTMgNzkuOTg1IDI4OS4zNjQgODAuNzc3TDI4OS4zNjQgODAuNzc3TDI2Ni42MDYgMTAzLjM0OUMyNjUuODE3IDEwNC4xNCAyNjQuNzIxIDEwNC41IDI2My41MDYgMTA0LjVDMjYyLjI5MSAxMDQuNSAyNjEuMTk3IDEwNC4xNCAyNjAuNDA2IDEwMy4zNDlMMjU3LjYzNiAxMDAuNTc2QzI1Ni44NDcgOTkuNzg4IDI1Ni41IDk4LjY4NyAyNTYuNSA5Ny41NzZDMjU2LjUgOTYuNDY1IDI1Ni44NDMgOTUuMzcyIDI1Ny42MzIgOTQuNTg0TDI2Ny4xMjQgODUuMDkyQzI2Ny44NjcgODQuMzM5IDI2OC4xNTYgODMuMzYgMjY4LjA4NyA4Mi40MTdMMjY4LjA4NyA4Mi40MTdDMjY4LjAxMyA4MS4zNjggMjY3LjU0OCA4MC4zNDkgMjY2LjczNiA3OS41NjRDMjY2LjY1OSA3OS40OTMgMjY2LjU4MSA3OS40MjIgMjY2LjUwMiA3OS4zNTNMMjU3LjYzMiA3MC41NjZDMjU2Ljg0NCA2OS43NzIgMjU2LjUgNjguNjcgMjU2LjUgNjcuNTYzQzI1Ni41IDY2LjQ1NSAyNTYuODQ0IDY1LjM1NiAyNTcuNjMzIDY0LjU2OEwyNjAuNDA2IDYxLjc5MkMyNjEuMTk0IDYxLjAwNiAyNjIuMjg3IDYwLjY2MiAyNjMuMzkgNjAuNjYyQzI2NC4xNDUgNjAuNjYyIDI2NC45MTcgNjAuODg3IDI2NS41NzggNjEuMzA3TDI2My41MDYgNTFaIiBmaWxsPSIjRkYwMDAwIi8+PC9nPjwvc3ZnPg==) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* Invite Page Styles */
.invite-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.invite-header {
    text-align: center;
    margin-bottom: 2rem;
}

.invite-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.invite-header .group-name {
    font-size: 1.25rem;
    color: #7f8c8d;
}

.loading-container,
.error-container {
    text-align: center;
    padding: 4rem 2rem;
}

.error-container h2 {
    color: #e74c3c;
}

.events-section,
.guests-section {
    margin-bottom: 2rem;
}

.events-section h2,
.guests-section h2 {
    color: #2c3e50;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.event-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.event-card h3 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.event-datetime {
    font-weight: 600;
    color: #34495e;
    margin: 0.25rem 0;
}

.event-location {
    color: #7f8c8d;
    margin: 0.25rem 0;
}

.event-dresscode,
.event-description {
    font-size: 0.9rem;
    color: #95a5a6;
    margin: 0.25rem 0;
}

.instruction {
    color: #7f8c8d;
    margin-bottom: 1rem;
}

.guest-card {
    background: #fff;
    border: 1px solid #ecf0f1;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.guest-card h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
}

.event-rsvp {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ecf0f1;
}

.event-rsvp > label {
    display: block;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 0.5rem;
}

.rsvp-options {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.rsvp-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.rsvp-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.dietary-section {
    margin-top: 1rem;
}

.dietary-section label {
    display: block;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 0.5rem;
}

.dietary-section input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.dietary-section input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.submit-section {
    text-align: center;
    margin-top: 2rem;
}

.submit-error {
    background: #fee;
    color: #c0392b;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.submit-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.submit-btn:hover:not(:disabled) {
    background: #219a52;
}

.submit-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

/* Confirmation Page Styles */
.confirmation-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 2rem;
}

.confirmation-content {
    text-align: center;
    max-width: 500px;
}

.checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
}

.checkmark svg {
    width: 100%;
    height: 100%;
}

.confirmation-content h1 {
    font-size: 2.5rem;
    color: #27ae60;
    margin-bottom: 0.5rem;
}

.confirmation-content .message {
    font-size: 1.25rem;
    color: #2c3e50;
    margin-bottom: 2rem;
}

.summary {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.summary h2 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.summary p {
    margin: 0;
    color: #7f8c8d;
}

.next-steps {
    margin-bottom: 2rem;
}

.next-steps p {
    margin: 0.5rem 0;
    color: #34495e;
}

.next-steps .note {
    font-size: 0.9rem;
    color: #95a5a6;
}

.back-link {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.back-link:hover {
    border-bottom-color: #3498db;
}

/* Responsive */
@media (max-width: 600px) {
    .invite-page {
        padding: 1rem;
    }

    .invite-header h1 {
        font-size: 2rem;
    }

    .rsvp-options {
        flex-direction: column;
        gap: 0.75rem;
    }

    .submit-btn {
        width: 100%;
    }
}

/* Admin Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 2rem;
}

.login-card {
    background: #fff;
    border: 1px solid #ecf0f1;
    border-radius: 8px;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-card h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.login-card .form-group {
    margin-bottom: 1rem;
}

.login-card .form-group label {
    display: block;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 0.5rem;
}

.login-card .form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.login-card .error-message {
    background: #fee;
    color: #c0392b;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    text-align: center;
}

.login-btn {
    width: 100%;
    background: #3498db;
    color: white;
    border: none;
    padding: 0.875rem;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 1rem;
}

.login-btn:hover:not(:disabled) {
    background: #2980b9;
}

.login-btn:disabled {
    background: #95a5a6;
}

.login-card .back-link {
    display: block;
    text-align: center;
    color: #7f8c8d;
    text-decoration: none;
}

/* Admin Pages */
.admin-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #ecf0f1;
}

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

.admin-header h1 {
    color: #2c3e50;
    margin: 0;
}

.logout-btn,
.back-btn {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
}

.logout-btn:hover,
.back-btn:hover {
    background: #7f8c8d;
}

/* Dashboard */
.wedding-info {
    text-align: center;
    margin-bottom: 2rem;
}

.wedding-info-header {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 1rem;
}

.wedding-info-header > div {
    flex: 1;
}

.wedding-info-header .edit-btn {
    flex-shrink: 0;
}

.wedding-info h2 {
    color: #2c3e50;
    margin: 0;
}

.wedding-info .wedding-date {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.wedding-info .wedding-location {
    color: #95a5a6;
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.stat-card.attending {
    background: #d4edda;
}

.stat-card.declined {
    background: #f8d7da;
}

.stat-card.pending {
    background: #fff3cd;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.stat-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    text-transform: uppercase;
}

.events-section,
.actions-section {
    margin-bottom: 2rem;
}

.events-section h3,
.actions-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.event-stat-card {
    background: #fff;
    border: 1px solid #ecf0f1;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.event-stat-card h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.event-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.event-stats .attending {
    color: #27ae60;
}

.event-stats .declined {
    color: #e74c3c;
}

.event-stats .pending {
    color: #f39c12;
}

.progress-bar {
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
}

.progress-bar .progress {
    height: 100%;
}

.progress-bar .progress.attending {
    background: #27ae60;
}

.progress-bar .progress.declined {
    background: #e74c3c;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
}

.action-btn:hover {
    background: #2980b9;
}

/* Guest Management */
.filter-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    min-width: 250px;
}

.search-box input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-box button {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.filter-options select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.guests-table-container {
    overflow-x: auto;
}

.guests-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.guests-table th,
.guests-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.guests-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.guests-table tr:hover {
    background: #f8f9fa;
}

.rsvp-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-right: 0.25rem;
}

.rsvp-badge.attending {
    background: #d4edda;
    color: #155724;
}

.rsvp-badge.declined {
    background: #f8d7da;
    color: #721c24;
}

.rsvp-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.edit-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.edit-btn:hover {
    background: #5a6268;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.pagination button {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.pagination button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.total-count {
    text-align: center;
    color: #7f8c8d;
    margin-top: 1rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal h2 {
    margin: 0 0 1.5rem 0;
    color: #2c3e50;
}

.modal .form-group {
    margin-bottom: 1rem;
}

.modal .form-group label {
    display: block;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 0.5rem;
}

.modal .form-group input,
.modal .form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: inherit;
}

.modal .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.modal .error-message {
    background: #fee;
    color: #c0392b;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    text-align: center;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

.modal-actions button {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.modal-actions button[type="button"] {
    background: #ecf0f1;
    border: none;
    color: #2c3e50;
}

.modal-actions .save-btn {
    background: #27ae60;
    border: none;
    color: white;
}

.modal-actions .save-btn:hover {
    background: #219a52;
}

.no-data {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
}

/* Events Management */
.events-management {
    margin-top: 1rem;
}

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

.section-header h2 {
    margin: 0;
    color: #2c3e50;
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-card-admin {
    background: #fff;
    border: 1px solid #ecf0f1;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.event-card-admin .event-info {
    flex: 1;
}

.event-card-admin h3 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.event-card-admin .event-datetime {
    font-weight: 600;
    color: #34495e;
    margin: 0.25rem 0;
}

.event-card-admin .event-endtime {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

.event-card-admin .event-location {
    color: #7f8c8d;
    margin: 0.25rem 0;
}

.event-card-admin .event-dresscode {
    color: #95a5a6;
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

.event-card-admin .event-order {
    color: #bdc3c7;
    font-size: 0.8rem;
    margin: 0.5rem 0 0 0;
}

.event-card-admin .event-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.no-events {
    text-align: center;
    padding: 3rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.no-events p {
    color: #7f8c8d;
    margin-bottom: 1rem;
}

/* Delete button styles */
.delete-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.delete-btn:hover:not(:disabled) {
    background: #c0392b;
}

.delete-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.modal-actions .delete-btn {
    padding: 0.5rem 1rem;
}

.warning-text {
    color: #e74c3c;
    font-size: 0.9rem;
    margin: 1rem 0;
}

.detail-text {
    color: #666;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.send-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-block;
}

.send-btn:hover {
    background: #229954;
    color: white;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.modal .form-group small {
    display: block;
    color: #95a5a6;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Guest Groups Management */
.groups-management {
    margin-top: 1rem;
}

.groups-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.group-card {
    background: #fff;
    border: 1px solid #ecf0f1;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.group-card .group-info {
    flex: 1;
}

.group-card .group-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.group-card h3 {
    margin: 0;
    color: #2c3e50;
}

.group-card .guest-count {
    background: #3498db;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

.group-card .group-detail {
    margin: 0.25rem 0;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.group-card .group-detail .label {
    color: #95a5a6;
    font-weight: 500;
}

.group-card .invite-link-section {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #ecf0f1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.group-card .invite-link-section .label {
    color: #95a5a6;
    font-size: 0.85rem;
}

.group-card .invite-token {
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #34495e;
    word-break: break-all;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.group-card .copy-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
}

.group-card .copy-btn:hover {
    background: #219a52;
}

.group-card .group-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.clear-btn {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.clear-btn:hover {
    background: #7f8c8d;
}

/* Enhanced Guest Management */
.modal-lg {
    max-width: 600px;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.event-assignments {
    background: #f8f9fa;
    border: 1px solid #ecf0f1;
    border-radius: 4px;
    padding: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.event-assignment-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #ecf0f1;
}

.event-assignment-row:last-child {
    border-bottom: none;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-buttons .delete-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.action-buttons .delete-btn:hover {
    background: #c0392b;
}

/* Group Detail View */
.view-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.view-btn:hover {
    background: #2980b9;
}

.group-detail-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ecf0f1;
}

.group-detail-section:last-of-type {
    border-bottom: none;
}

.group-detail-section h3 {
    font-size: 1rem;
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-item.full-width {
    grid-column: span 2;
}

.detail-item .label {
    font-size: 0.8rem;
    color: #7f8c8d;
}

.invite-status-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.invite-link-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.invite-link-row .invite-token {
    flex: 1;
    min-width: 200px;
}

.accessed {
    color: #27ae60;
    font-weight: 600;
}

.not-accessed {
    color: #95a5a6;
}

.no-token,
.no-guests {
    color: #7f8c8d;
    font-style: italic;
    font-size: 0.9rem;
}

.section-header-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.section-header-inline h3 {
    margin-bottom: 0;
}

.action-btn.small {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}

.guests-mini-list {
    background: #f8f9fa;
    border: 1px solid #ecf0f1;
    border-radius: 4px;
    padding: 0.5rem;
}

.guest-mini-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid #ecf0f1;
}

.guest-mini-row:last-child {
    border-bottom: none;
}

.guest-name {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guest-email {
    color: #7f8c8d;
    font-size: 0.85rem;
}

.primary-badge {
    background: #9b59b6;
    color: white;
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-weight: normal;
}

/* Tasks Management */
.tasks-management {
    margin-top: 1rem;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.task-card {
    background: #fff;
    border: 1px solid #ecf0f1;
    border-radius: 8px;
    padding: 1.25rem;
    border-left: 4px solid #3498db;
}

.task-card.task-completed {
    border-left-color: #27ae60;
    opacity: 0.8;
}

.task-card.task-in-progress {
    border-left-color: #f39c12;
}

.task-card.task-not-started {
    border-left-color: #95a5a6;
}

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

.task-priority {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.task-priority.priority-high {
    background: #e74c3c;
    color: white;
}

.task-priority.priority-medium {
    background: #f39c12;
    color: white;
}

.task-priority.priority-low {
    background: #95a5a6;
    color: white;
}

.task-status {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.task-info h3 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.task-completed .task-info h3 {
    text-decoration: line-through;
    color: #95a5a6;
}

.task-description {
    color: #7f8c8d;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.task-category {
    display: inline-block;
    background: #ecf0f1;
    color: #34495e;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
}

.task-duedate {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.task-duedate.overdue {
    color: #e74c3c;
}

.overdue-badge {
    background: #e74c3c;
    color: white;
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    margin-left: 0.5rem;
}

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

.complete-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.complete-btn:hover {
    background: #219a52;
}

.no-tasks {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
}

.filter-select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Vendors Management */
.vendors-management {
    margin-top: 1rem;
}

.vendor-summary {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.summary-item {
    display: flex;
    flex-direction: column;
}

.summary-label {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.summary-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
}

.summary-value.balance-due {
    color: #e74c3c;
}

.vendors-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.vendor-card {
    background: #fff;
    border: 1px solid #ecf0f1;
    border-radius: 8px;
    padding: 1.25rem;
}

.vendor-header {
    margin-bottom: 0.75rem;
}

.vendor-category {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.vendor-info h3 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.vendor-contact,
.vendor-email,
.vendor-phone {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

.vendor-email a,
.vendor-phone a {
    color: #3498db;
    text-decoration: none;
}

.vendor-email a:hover,
.vendor-phone a:hover {
    text-decoration: underline;
}

.vendor-financials {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 4px;
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.financial-item {
    display: flex;
    flex-direction: column;
}

.financial-label {
    font-size: 0.75rem;
    color: #7f8c8d;
}

.financial-value {
    font-weight: 600;
    color: #2c3e50;
}

.financial-value.paid {
    color: #27ae60;
}

.financial-value.due {
    color: #e74c3c;
}

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

.no-vendors {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
}

/* Vendor Detail View */
.vendor-detail-view {
    margin: 1rem 0;
}

.detail-row {
    display: flex;
    padding: 0.5rem 0;
    border-bottom: 1px solid #ecf0f1;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    width: 120px;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.detail-value {
    flex: 1;
    color: #2c3e50;
}

.detail-value a {
    color: #3498db;
    text-decoration: none;
}

.detail-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #ecf0f1;
}

.detail-section h4 {
    margin: 0 0 0.75rem 0;
    color: #2c3e50;
}

.vendor-notes {
    white-space: pre-wrap;
    color: #7f8c8d;
    line-height: 1.5;
}

/* Large Modal */
.modal.modal-large {
    max-width: 600px;
}

/* Form Row Styles */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-row.three-col {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 600px) {
    .form-row,
    .form-row.three-col {
        grid-template-columns: 1fr;
    }

    .vendors-list {
        grid-template-columns: 1fr;
    }

    .vendor-summary {
        flex-direction: column;
        gap: 1rem;
    }

    .task-actions {
        flex-direction: column;
    }

    .task-actions button {
        width: 100%;
    }
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid #ecf0f1;
    margin-top: 1rem;
}

.pagination-info {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.pagination-size {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-size label {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.pagination-size select {
    padding: 0.35rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.pagination-btn:hover:not(:disabled) {
    background: #2980b9;
}

.pagination-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.pagination-page {
    color: #2c3e50;
    font-size: 0.9rem;
    padding: 0 0.5rem;
}

/* Sortable Headers */
.sortable-header {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.sortable-header:hover {
    background: #ecf0f1;
}

.sortable-header.active {
    background: #e8f4fc;
}

.sort-indicator {
    margin-left: 0.5rem;
    font-size: 0.75rem;
    color: #3498db;
}

/* Sort Dropdown */
.sort-dropdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-dropdown label {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.sort-dropdown select {
    padding: 0.4rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    min-width: 120px;
}

.sort-direction-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #2c3e50;
}

.sort-direction-btn:hover {
    background: #ecf0f1;
}

/* Filter Section Updates */
.filter-section {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .pagination-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .sort-dropdown {
        flex-wrap: wrap;
    }

    .filter-section {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Desktop mini drawer styles */
@media (min-width: 601px) {
    /* Ensure mini drawer is visible and properly positioned */
    .mud-drawer.mud-drawer--mini {
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: none !important;
        position: relative !important;
    }

    /* Ensure drawer container is visible on desktop */
    .mud-drawer-container {
        visibility: visible !important;
        pointer-events: auto !important;
    }

    /* Mini drawer should be in document flow and reserve space */
    .mud-drawer--mini.mud-drawer--closed {
        width: 56px !important;
        min-width: 56px !important;
    }

    /* Expanded drawer width */
    .mud-drawer--mini.mud-drawer--open {
        width: 240px !important;
        min-width: 240px !important;
    }

    /* Main content margin matches drawer state */
    .mud-main-content {
        margin-left: 56px !important;
        padding-left: 24px !important;
        padding-right: 24px !important;
        transition: margin-left 0.2s ease;
    }

    /* When drawer is expanded via click, main content margin increases */
    .drawer-expanded .mud-main-content {
        margin-left: 240px !important;
    }
}

/* Mobile navigation drawer styles */
@media (max-width: 600px) {
    .mud-drawer {
        width: 280px !important;
    }

    /* Ensure temporary drawer is fully hidden when closed */
    .mud-drawer--closed.mud-drawer--temporary {
        transform: translateX(-100%) !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* Hide the drawer container when drawer is closed on mobile */
    .mud-drawer-container:has(.mud-drawer--closed.mud-drawer--temporary) {
        visibility: hidden;
        pointer-events: none;
    }

    /* Ensure drawer overlay is hidden when drawer is closed */
    .mud-drawer--closed ~ .mud-overlay,
    .mud-drawer--closed + .mud-overlay {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }

    .mud-drawer .mud-nav-link {
        padding: 12px 16px;
    }

    .mud-drawer .mud-navmenu {
        padding-top: 8px;
    }
}


/* Fix drawer overlay z-index to be below navbar but above content */
.mud-overlay {
    z-index: 1099 !important;
}

/* Ensure MudAppBar stays on top */
.mud-appbar {
    z-index: 1100 !important;
}

/* Group List Row Layout */
.group-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.group-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    gap: 1rem;
    transition: box-shadow 0.2s ease;
}

.group-row:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.group-row-main {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.group-row-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.group-name-text {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.group-row-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #666;
}

.group-contact-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.group-contact-item .contact-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.group-row-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

/* ===== Groups Page Mobile Layout ===== */
.groups-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.groups-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.groups-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.groups-search-field {
    flex: 1;
    min-width: 180px;
}

.groups-sort-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.groups-sort-select {
    width: 110px;
}

.groups-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.page-size-select {
    width: 70px;
}

/* Group Card Mobile */
.group-card-mobile {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
}

.group-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0.25rem;
}

.group-card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.group-name-text {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.group-card-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #666;
    padding: 0.5rem 0;
}

.group-contact-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.group-contact-item .contact-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.group-card-actions {
    display: flex;
    align-items: center;
    gap: 0;
    border-top: 1px solid #eee;
    padding-top: 0.5rem;
    margin-top: 0.25rem;
}

/* ===== Guests Page Mobile Layout ===== */
.guests-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.guests-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.guests-filters {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.guests-search-row {
    width: 100%;
}

.guests-search-field {
    width: 100%;
}

.guests-filter-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.guests-filter-select {
    flex: 1;
    min-width: 100px;
}

.guests-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Guest Card Mobile */
.guest-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.guest-card-mobile {
    padding: 0.75rem;
    border-radius: 8px;
}

.guest-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.guest-card-name {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.guest-card-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: #666;
    padding: 0.5rem 0;
}

.guest-detail-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.guest-detail-item .detail-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.guest-card-rsvp {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.25rem 0;
}

.guest-card-actions {
    display: flex;
    align-items: center;
    gap: 0;
    border-top: 1px solid #eee;
    padding-top: 0.5rem;
    margin-top: 0.25rem;
}

/* Invite Switch Styling */
.invite-switch {
    margin: 0;
}

/* ===== Mobile-specific adjustments ===== */
@media (max-width: 600px) {
    /* Header adjustments */
    .groups-header,
    .guests-header {
        flex-direction: column;
        align-items: stretch;
    }

    .groups-header-actions,
    .guests-header-actions {
        justify-content: flex-end;
    }

    /* Filters adjustments */
    .groups-filters {
        flex-direction: column;
    }

    .groups-search-field {
        width: 100%;
        min-width: unset;
    }

    .groups-sort-controls {
        width: 100%;
        justify-content: flex-start;
    }

    .groups-sort-select {
        flex: 1;
        width: auto;
    }

    .guests-filter-row {
        flex-direction: row;
    }

    .guests-filter-select {
        min-width: 0;
    }

    /* Card contact text truncation */
    .group-contact-item .contact-text,
    .guest-detail-item .detail-text {
        max-width: 180px;
    }

    /* Pagination adjustments */
    .groups-pagination,
    .guests-pagination {
        flex-direction: column;
        gap: 0.75rem;
    }

    .page-size-select {
        width: 80px;
    }

    /* Actions row - keep horizontal on mobile */
    .group-card-actions,
    .guest-card-actions {
        justify-content: flex-start;
    }
}

/* Small mobile adjustments (< 400px) */
@media (max-width: 400px) {
    .group-card-mobile,
    .guest-card-mobile {
        padding: 0.5rem;
    }

    .group-card-title,
    .guest-card-name {
        gap: 0.25rem;
    }

    .group-contact-item .contact-text,
    .guest-detail-item .detail-text {
        max-width: 140px;
    }
}
