:root {
    --header-height: 60px;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f8fbff;
    margin: 0;
    padding: 0;
    color: #234;
    height: 100vh;
    overflow: hidden;  /* Prevents double scrollbars */
}

.dashboard-container {
    max-width: 960px;
    margin: 30px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 24px #bdd6ef55;
    padding: 28px 36px 36px 36px;
}


header .logo {
    max-width: 110px;
}

header h1 {
    font-size: 1.5em;
    margin: 0 18px 0 18px;
    flex: 1 1 auto;
}

.logout-link {
    background: #d34a4a;
    color: #fff;
    padding: 7px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.15s;
}

.logout-link:hover {
    background: #b13232;
}

.flash {
    padding: 12px 16px;
    margin: 12px 0 18px 0;
    border-radius: 8px;
    font-size: 1.07em;
    background: #f3f7ff;
    color: #245;
    border-left: 4px solid #72b4fc;
}

.flash.error {
    color: #b02121;
    background: #fff5f5;
    border-left-color: #e55959;
}

.flash.success {
    color: #196e2d;
    background: #e8fff3;
    border-left-color: #4cc585;
}

.data-table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 10px;
    background: #fcfdff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 6px #b1d0ed30;
}

.data-table th,
.data-table td {
    padding: 10px 13px;
    text-align: left;
}

.data-table th {
    background: #f5faff;
    font-weight: 600;
    color: #247;
    border-bottom: 2px solid #dbeaff;
}

.data-table tr:nth-child(even) td {
    background: #f7fbff;
}

.info-box {
    padding: 20px 18px;
    background: #f2faff;
    color: #568;
    border-radius: 10px;
    margin: 18px 0;
    font-size: 1.1em;
}

.login-container {
    max-width: 370px;
    margin: 80px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 3px 24px #bdd6ef55;
    padding: 38px 32px 26px 32px;
    text-align: center;
}

.login-container .logo {
    margin-bottom: 18px;
}

.login-container h2 {
    margin-bottom: 12px;
}

.login-container input[type="email"],
.login-container input[type="password"] {
    width: 98%;
    padding: 12px;
    border: 1px solid #c6e0fa;
    border-radius: 7px;
    margin-bottom: 17px;
    font-size: 1.1em;
    background: #fafdff;
}

.login-container button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: #2472bd;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background 0.18s;
}

.login-container button[type="submit"]:hover {
    background: #1d5b9e;
}

.login-links {
    margin-top: 10px;
    font-size: 0.98em;
}

.login-links a {
    color: #2568ba;
    text-decoration: none;
    margin: 0 7px;
}

.login-links a:hover {
    text-decoration: underline;
}

/* --- Header --- */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 28px;
    background: #2472bd;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    min-height: var(--header-height);
    max-height: var(--header-height);
    z-index: 200;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
}

.main-logo {
    height: 40px;
    margin-right: 10px;
}

.site-name {
    font-weight: 700;
    font-size: 1.3em;
}

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

.header-user {
    font-weight: 600;
}

.logout-btn {
    background: #d34a4a;
    padding: 8px 14px;
    border-radius: 6px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.logout-btn:hover {
    background: #b13232;
}

/* --- Sidebar --- */
.sidebar {
    position: fixed;
    top: var(--header-height); /* Matches header exactly */
    left: 0;
    width: 220px;
    height: calc(100vh - var(--header-height));
    background: #f4f9ff;
    box-shadow: 1px 0 5px rgba(0,0,0,0.1);
    overflow-y: auto;
    z-index: 90;
    padding: 20px 0;
    box-sizing: border-box;
}

/* Sidebar menu */
.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar-menu li {
    margin-bottom: 12px;
}
.sidebar-menu a {
    text-decoration: none;
    padding: 12px 24px;
    display: block;
    color: #2472bd;
    font-weight: 600;
    border-radius: 6px;
    transition: background 0.13s;
}
.sidebar-menu a:hover {
    background: #e0ebff;
}
.sidebar-menu a.active {
    font-weight: 700;
    color: #2667bf;
    background: #e0ebff;      /* Plain subtle blue background */
    border-left: 4px solid #2667bf; /* Or match your accent color, or remove for no border */
    border-radius: 6px;
    box-shadow: none;
    padding-left: 24px;
}

/* --- Remove broken sidebar background layer --- */
/* .sidebar::before { ... } REMOVED */

/* --- Main content (scrolls independently) --- */
.main-content {
    position: absolute;
    top: var(--header-height);
    left: 220px;
    right: 0;
    bottom: 0;
    padding: 28px 36px 36px 36px;
    box-sizing: border-box;
    overflow-y: auto;
    background: #f8fbff;
    min-width: 0;
    min-height: 0;
    height: calc(100vh - var(--header-height) - 45px); /* subtract footer height */
}

/* Footer fixed bottom */
.main-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    background: #2472bd;
    color: #fff;
    text-align: center;
    padding: 14px 0;
    font-size: 0.95em;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 110;
}

/* Stats & recent sessions */
.stats-summary p {
    font-size: 1.1em;
    margin: 8px 0;
}

.recent-sessions h3 {
    margin-top: 28px;
    margin-bottom: 12px;
}

/* Filter form */
.filter-form {
    margin-bottom: 20px;
    font-family: Arial, sans-serif;
    color: #222 !important;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

@media (max-width: 600px) {
    .filter-form {
        flex-direction: column;
        align-items: flex-end;
    }
}

.filter-form select {
    color: #222 !important;
    background-color: #fff !important;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
}

/* Photo grid */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin: 30px 0;
}

@media (max-width: 1020px) {
    .photos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .photos-grid {
        grid-template-columns: 1fr;
    }
}

/* Photo card */
.photo-card {
    background: #10141b;
    border-radius: 18px;
    box-shadow: 0 3px 18px #0004;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.photo-main-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    background: #181d25;
    aspect-ratio: 16 / 9;
    border-radius: 18px 18px 0 0;
}

.photo-bar {
    background: #171c25;
    color: #fff;
    padding: 18px 18px 13px 18px;
    font-family: 'Oswald', Arial, sans-serif;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    min-height: 62px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.photo-bar .company {
    font-weight: bold;
    font-size: 1.14em;
    color: #ffdb89;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.photo-bar .info-line {
    display: flex;
    gap: 12px;
    font-size: 1em;
    color: #87b8ed;
    white-space: nowrap;
    align-items: center;
}

.photo-bar .info-line div:not(:last-child)::after {
    content: "•";
    margin-left: 12px;
    color: #6e7a8a;
}

.photo-bar .date {
    color: #b1bac7;
    font-size: 0.92em;
}

.profile-form label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
}

.profile-form input[type="text"],
.profile-form input[type="email"],
.profile-form input[type="password"],
.profile-form input[type="file"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1.2px solid #bfd5f6;
    background: #f7fbff;
    font-size: 1em;
    margin-top: 4px;
}

.profile-img-block {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.profile-img {
    max-width: 120px;
    border-radius: 8px;
    margin-bottom: 8px;
}
