/* ----------------------------------------------
    GLOBAL RESET & BASE STYLE
---------------------------------------------- */

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

.header {
    padding: 20px;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f7f7f9;
    color: #222;
    line-height: 1.45;
}

/* Center auth pages */
body.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* Prevent jump-on-mobile */
body.auth-page .container {
    max-width: 420px;
}

/* Normal page container */
.container {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 16px;
}

/* ----------------------------------------------
    TOP NAV (for authenticated pages)
---------------------------------------------- */

.top-nav {
    width: 100%;
    background: #ffffff;
    padding: 14px 18px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.top-nav .app-title {
    font-size: 18px;
    font-weight: 700;
}

.top-nav .logout-btn {
    font-size: 14px;
    color: #0077ff;
    text-decoration: none;
    font-weight: 600;
}

/* ----------------------------------------------
    PAGE HEADERS
---------------------------------------------- */

.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
}

.page-header .subtitle {
    color: #666;
    font-size: 14px;
    margin-top: -4px;
}

/* ----------------------------------------------
    FORMS
---------------------------------------------- */

form {
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    border-radius: 10px;
    border: 1px solid #d8d8dd;
    background: #fff;
    margin-bottom: 18px;
}

textarea {
    min-height: 110px;
}

/* Auth-specific form tweaks */
.auth-form {
    padding: 26px;
}

.auth-form h2 {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 18px;
}

.auth-helper {
    text-align: center;
    margin-top: 14px;
    font-size: 14px;
}

.auth-helper a {
    color: #0077ff;
    text-decoration: none;
}

/* Error message */
.form-error {
    background: #ffe1e1;
    border: 1px solid #ffb3b3;
    color: #a30000;
    padding: 10px;
    margin-bottom: 16px;
    border-radius: 8px;
}

/* ----------------------------------------------
    BUTTONS
---------------------------------------------- */

.btn {
    display: inline-block;
    padding: 12px 18px;
    background: #0077ff;
    color: white;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    text-align: center;
    width: 100%;
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
}

.btn:hover {
    background: #005fcc;
}

.btn-secondary {
    background: #eaeaea;
    color: #333;
}

.btn-secondary:hover {
    background: #d6d6d6;
}

/* ----------------------------------------------
    CARDS / LIST VIEWS
---------------------------------------------- */

.card {
    background: #fff;
    padding: 14px;
    border-radius: 12px;
    box-shadow: 0px 2px 5px rgba(0,0,0,0.06);
    margin-bottom: 16px;
}

.card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.card .meta {
    font-size: 14px;
    color: #777;
}

/* ----------------------------------------------
    PROPERTY PHOTOS GRID
---------------------------------------------- */

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.photo-grid img {
    width: 100%;
    border-radius: 12px;
    height: 90px;
    object-fit: cover;
}

/* ----------------------------------------------
    TABLE (desktop only)
---------------------------------------------- */

@media (min-width: 700px) {
    table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 16px;
    }

    table th, table td {
        padding: 12px;
        border-bottom: 1px solid #eee;
        text-align: left;
    }

    table th {
        background: #fafafa;
    }
}
/* ------------------------------
   NAVIGATION BAR
------------------------------ */
.top-nav {
    background: #fff;
    padding: 14px 18px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo-img {
    height: 42px;
}

.nav-right {
    display: flex;
    align-items: center;
}

/* Hamburger */
.nav-toggle {
    background: none;
    border: none;
    font-size: 26px;
    padding: 6px 10px;
    cursor: pointer;
    display: inline-block;
}

.nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 68px;
    right: 14px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.12);
    padding: 8px 0;
    width: 180px;
}

body.nav-open .nav-menu {
    display: flex;
}

.nav-menu a {
    padding: 12px 18px;
    text-decoration: none;
    color: #222;
    font-weight: 600;
    font-size: 15px;
}

.nav-menu a:hover {
    background: #f1f1f5;
}

.logout-link {
    color: #d70000 !important;
}

/* Desktop menu */
@media (min-width: 720px) {
    .nav-toggle {
        display: none;
    }

    .nav-menu {
        display: flex !important;
        position: static;
        flex-direction: row;
        background: none;
        box-shadow: none;
        width: auto;
        padding: 0;
    }

    .nav-menu a {
        margin-left: 18px;
        padding: 0;
    }
}
