/* Global Reset & Typography */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: #0f172a;
    color: #f8fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Glassmorphic Navigation Bar */
#nav {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    height: 80px;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: fixed;
    top: 0;
    z-index: 1000;
}

.logo img {
    height: 45px;
    object-fit: contain;
}

.nav-items {
    display: flex;
    gap: 16px;
    align-items: center;
}

.nav-items a {
    padding: 10px 20px;
    text-decoration: none;
    color: #cbd5e1;
    font-weight: 600;
    font-size: 16px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.nav-items a:hover,
.nav-items a.active {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

/* Main content wrapper */
.main-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px 60px;
    flex: 1;
}

/* Page Headers */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h2 {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(to right, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 16px;
    color: #94a3b8;
}

/* Dashboard Content Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

/* Glass Cards / Section Boxes */
.section-box {
    background: rgba(30, 41, 59, 0.45);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.section-box h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #f8fafc;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

/* Mess list and items styling */
.mess-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.mess-item {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.mess-item:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.3);
    background: rgba(15, 23, 42, 0.6);
}

.mess-item h4 {
    font-size: 20px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 12px;
}

.mess-item p {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 8px;
    line-height: 1.5;
}

.mess-item p b {
    color: #cbd5e1;
}

.tag-badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    margin-right: 6px;
    margin-top: 4px;
}

.tag-badge.service {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.tag-badge.meal {
    background: rgba(129, 140, 248, 0.15);
    color: #818cf8;
    border: 1px solid rgba(129, 140, 248, 0.2);
}

.mess-item .card-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.edit-btn,
.delete-btn {
    flex: 1;
    text-align: center;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    outline: none;
}

.edit-btn {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
}

.edit-btn:hover {
    background: #38bdf8;
    color: white;
}

.delete-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.delete-btn:hover {
    background: #ef4444;
    color: white;
}

/* Centered Form Containers (Login, Register, Add/Edit) */
.form-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    background: radial-gradient(circle at top, #1e1b4b, #0f172a);
    padding: 120px 20px 40px;
}

.auth-form {
    width: 100%;
    max-width: 500px;
    background: rgba(30, 41, 59, 0.75);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(to right, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-form p.sub-text {
    text-align: center;
    color: #94a3b8;
    margin-bottom: 30px;
    font-size: 14px;
}

/* Edit / Add Property Form Layout */
.form-card {
    background: rgba(30, 41, 59, 0.45);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 30px;
    max-width: 800px;
    margin: 0 auto 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group.double {
    flex-direction: row;
    gap: 20px;
}

.form-group.double .half {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #cbd5e1;
}

/* Form Fields */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.6);
    color: #f8fafc;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

/* Custom checkbox / radio options */
.options-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(15, 23, 42, 0.4);
    border-radius: 12px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: #cbd5e1;
    cursor: pointer;
}

.option-item input {
    accent-color: #38bdf8;
    width: 18px;
    height: 18px;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, #38bdf8 0%, #4f46e5 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

/* Location Map Actions */
.btn-location {
    padding: 10px 16px;
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-location:hover {
    background: #38bdf8;
    color: white;
}

/* Notifications styling */
.notification {
    position: fixed;
    top: 90px;
    right: 20px;
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(12px);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.2);
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    z-index: 1001;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-text {
    color: #ef4444 !important;
    text-align: center;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 500;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #94a3b8;
}

.auth-footer a {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.auth-footer a:hover {
    color: #818cf8;
    text-decoration: underline;
}

/* Footer Styling */
footer {
    margin-top: auto;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

footer a {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

footer a:hover {
    color: #818cf8;
    text-decoration: underline;
}

/* Responsive Media Queries */
@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    #nav {
        padding: 0 20px;
        height: auto;
        min-height: 70px;
        flex-direction: column;
        justify-content: center;
        gap: 10px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .logo img {
        height: 35px;
    }

    .nav-items {
        width: 100%;
        justify-content: center;
        gap: 8px;
    }

    .nav-items a {
        padding: 8px 12px;
        font-size: 14px;
    }

    .main-content {
        padding-top: 150px;
    }

    .form-group.double {
        flex-direction: column;
        gap: 16px;
    }

    .form-card {
        padding: 24px 16px;
    }

    .auth-form {
        padding: 30px 20px;
    }
}

@media (max-width: 520px) {
    .section-box {
        padding: 20px 16px;
        border-radius: 16px;
    }

    .mess-item {
        padding: 16px;
    }
}
