/* Стили фиксированного верхнего меню */
:root {
    --navbar-height: 80px;
}

body {
    padding-top: var(--navbar-height);
}

/* mobile */
@media (max-width: 576px) {
    :root {
        --navbar-height: 56px;
    }
}

/* Выравнивание элементов в меню гамбургера */
@media (max-width: 992px) {

    /*.navbar-nav {*/
    /*    margin-top: 15px;*/
    /*}*/

    .navbar-nav .nav-link {
        padding: 10px 0;
        font-size: 18px;
    }

    .navbar-nav .nav-link.active {
        color: #0d6efd;
        font-weight: 600;
    }

    .navbar .btn {
        width: 100%;
        margin-top: 10px;
    }

    .navbar .d-flex {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Стили гамбургера для мобильной версии */
.navbar-toggler {
    border: none;
    box-shadow: none !important;
}

.hamburger {
    width: 24px;
    height: 18px;
    position: relative;
    display: inline-block;
}

.hamburger span {
    position: absolute;
    height: 2px;
    width: 100%;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
    left: 0;
}

/* Линии */
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 8px; }
.hamburger span:nth-child(3) { top: 16px; }

/* default = burger */
.navbar-toggler.collapsed .hamburger span:nth-child(1) {
    transform: none;
    top: 0;
}

.navbar-toggler.collapsed .hamburger span:nth-child(2) {
    opacity: 1;
}

.navbar-toggler.collapsed .hamburger span:nth-child(3) {
    transform: none;
    top: 16px;
}

/* open = X */
.navbar-toggler:not(.collapsed) .hamburger span:nth-child(1) {
    transform: rotate(45deg);
    top: 8px;
}

.navbar-toggler:not(.collapsed) .hamburger span:nth-child(2) {
    opacity: 0;
}

.navbar-toggler:not(.collapsed) .hamburger span:nth-child(3) {
    transform: rotate(-45deg);
    top: 8px;
}

.navbar-toggler:hover .hamburger span {
    background: #0d6efd;
}

/* Логотип в верхнем меню */
.navbar-logo {
  height: 70px;
  width: auto;
  transition: all 0.3s ease;
}

/* Мобильная версия */
@media (max-width: 576px) {
  .navbar-logo {
    height: 32px;
  }
}

#mainNavbar.scrolled .navbar-logo {
  height: 30px;
}

/* Стили страниц авторизации */
.auth-page {
    height: 100vh;
    background: #f8f9fa;
}

.auth-page .auth-card {
    max-width: 400px;
    width: 100%;
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.auth-page .form-control {
    border-radius: 8px;
}

.auth-page .btn-primary {
    border-radius: 8px;
}

.iti {
  display: block !important;/* или none */
}

.student-photo {
    height: 260px;
    overflow: hidden;
}

.student-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.student-detail-photo {
    height: 500px;
    overflow: hidden;
}

.student-detail-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.student-placeholder {
    height: 260px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 72px;

    background: #f8f9fa;
}

.dashboard-hero {
    border-radius: 16px;
}

.dashboard-tile {
    border: none;
    border-radius: 16px;

    transition: all .2s ease;

    height: 100%;
}

.dashboard-tile:hover {
    transform: translateY(-3px);
}

.dashboard-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.dashboard-link {
    text-decoration: none;
    color: inherit;
}

.birthday-card {
    border-left: 4px solid #ffc107;
}

.student-avatar {
    width: 220px;
    height: 220px;

    object-fit: cover;

    border-radius: 50%;

    border: 5px solid #fff;

    box-shadow: 0 5px 20px rgba(0,0,0,.15);
}

.representative-card {
    border: none;
    border-radius: 16px;

    transition: .2s;
}

.representative-card:hover {
    transform: translateY(-2px);
}

.representative-phone {
    text-decoration: none;
    font-weight: 500;
}

.news-pinned {
    border-left: 5px solid #ffc107;
}

/*.student-card {*/
/*    display: flex;*/
/*    align-items: center;*/

/*    background: #fff;*/
/*    border-radius: 18px;*/

/*    padding: 14px;*/
/*    gap: 16px;*/

/*    border: 1px solid #edf0f2;*/

/*    transition: all .25s ease;*/
/*}*/

.student-card {
    position: relative;

    display: flex;
    align-items: center;

    background: #fff;
    border-radius: 18px;
    padding: 14px;
    gap: 16px;

    border: 1px solid #edf0f2;

    transition: all .25s ease;
}

.student-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    border-color: #dbe2ea;
}

.student-avatar {
    width: 72px;
    height: 72px;

    border-radius: 50%;
    object-fit: cover;

    flex-shrink: 0;
}

.student-avatar-placeholder {
    width: 72px;
    height: 72px;

    border-radius: 50%;

    background: linear-gradient(
        135deg,
        #2563eb,
        #4f46e5
    );

    color: white;
    font-size: 28px;
    font-weight: 700;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;
}

.student-info {
    min-width: 0;
}

.student-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
}

.student-meta {
    margin-top: 4px;
    font-size: .875rem;
    color: #6b7280;
}

.birthday-corner {
    position: absolute;
    top: 10px;
    right: 10px;

    font-size: 0.75rem;
    font-weight: 600;

    padding: 4px 10px;
    border-radius: 999px;

    z-index: 2;
}

.birthday-today {
    background: #fef3c7;
    color: #92400e;
}

.birthday-soon {
    background: #dbeafe;
    color: #1d4ed8;
}

html {
    scroll-behavior: smooth;
}

/* =========================
   Layout
   ========================= */

.gallery-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 32px;
}

/* =========================
   Sidebar
   ========================= */

.gallery-sidebar {
    position: relative;
}

.albums-nav {
    position: sticky;
    top: 90px;

    background: #fff;

    border: 1px solid #e5e7eb;
    border-radius: 18px;

    padding: 16px;
}

.albums-nav-title {
    font-size: 1rem;
    font-weight: 600;

    margin-bottom: 12px;
}

.album-link {
    display: block;

    padding: 8px 12px;

    border-radius: 10px;

    color: #374151;
    text-decoration: none;

    transition: .2s;
}

.album-link:hover {
    background: #f3f4f6;
}

/* =========================
   Masonry
   ========================= */

.gallery-grid {
    column-count: 5;
    column-gap: 16px;
}

.gallery-item {
    display: block;

    break-inside: avoid;

    margin-bottom: 16px;

    border-radius: 18px;
    overflow: hidden;

    transition: .2s;
}

.gallery-item:hover {
    transform: translateY(-2px);
}

.gallery-item img {
    width: 100%;
    display: block;
}

/* =========================
   Album Divider
   ========================= */

.album-divider {
    column-span: all;

    display: flex;
    align-items: center;

    gap: 16px;

    margin: 40px 0 24px;
}

.album-divider-line {
    flex: 1;

    height: 1px;

    background: #e5e7eb;
}

.album-divider-content {
    display: flex;
    align-items: center;

    gap: 10px;

    white-space: nowrap;
}

.album-icon {
    font-size: 1rem;
}

.album-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.album-date {
    color: #6b7280;
    font-size: .9rem;
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 1600px) {

    .gallery-grid {
        column-count: 4;
    }

}

@media (max-width: 1200px) {

    .gallery-layout {
        grid-template-columns: 1fr;
    }

    .gallery-sidebar {
        display: none;
    }

    .gallery-grid {
        column-count: 4;
    }

}

@media (max-width: 992px) {

    .gallery-grid {
        column-count: 3;
    }

}

@media (max-width: 768px) {

    .gallery-grid {
        column-count: 2;
    }

}

@media (max-width: 576px) {

    .gallery-grid {
        column-count: 1;
    }

}

.profile-avatar {
    width: 72px;
    height: 72px;

    border-radius: 50%;

    background: #0d6efd;
    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 28px;
    font-weight: 600;
}

.children-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.child-row {
    display: flex;
    align-items: center;

    padding: 14px 18px;

    background: #fff;

    border-radius: 14px;

    text-decoration: none;
    color: inherit;

    box-shadow: 0 2px 8px rgba(0,0,0,.06);

    transition: all .2s ease;
}

.child-row:hover {
    transform: translateY(-2px);

    box-shadow: 0 4px 14px rgba(0,0,0,.1);

    color: inherit;
}

.child-avatar {
    width: 56px;
    height: 56px;

    flex-shrink: 0;

    border-radius: 50%;

    overflow: hidden;

    background: #f1f3f5;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 600;
}

.child-avatar img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.child-info {
    margin-left: 16px;

    flex-grow: 1;
}

.child-name {
    font-weight: 600;
    font-size: 1rem;
}

.child-meta {
    color: #6c757d;
    font-size: .9rem;
}

.child-arrow {
    font-size: 24px;
    color: #adb5bd;
}

.nav-tabs .nav-link {
    border: none;
    color: #555;
}

.nav-tabs .nav-link.active {
    font-weight: 600;
}

/* ===== Финансы ===== */

.finance-stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    height: 100%;
}

.finance-stat-title {
    color: #6c757d;
    font-size: .9rem;
}

.finance-stat-value {
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 6px;
}

.finance-child-card {
    background: #f8f9fa;
    border-radius: 14px;
    padding: 16px;
    transition: .2s;
}

.finance-child-card:hover {
    background: #f1f3f5;
}

.finance-charge-row {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 16px 0;

    border-bottom: 1px solid #ececec;
}

.finance-charge-row:last-child {
    border-bottom: none;
}


.teacher-card {
    position: relative;
}

/* бейдж классного руководителя */
.teacher-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #2c3e50;
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
}

/* предметы */
.teacher-subjects {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.subject-chip {
    background: #eaf2ff;
    color: #2c6ed5;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

/* чуть отличаем учителей от учеников */
.teacher-card {
    border-left: 4px solid #2c6ed5;
}

.teacher-photo {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid #f3f4f6;
}

.teacher-photo-placeholder {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    margin: 0 auto;
}

.teacher-name {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

/*.teacher-subjects {*/
/*    display: flex;*/
/*    flex-wrap: wrap;*/
/*    gap: 8px;*/
/*}*/

.subject-chip {
    background: #e8f0ff;
    color: #2563eb;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.schedule-day-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.05);
    height: 100%;
}

.schedule-day-header {
    background: #2563eb;
    color: white;
    padding: 14px 20px;
    font-size: 18px;
    font-weight: 600;
}

.schedule-day-body {
    padding: 15px;
}

.lesson-item {
    display: flex;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.lesson-item:last-child {
    border-bottom: none;
}

.lesson-number {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 700;

    display: flex;
    align-items: center;
    justify-content: center;
}

.lesson-subject {
    font-weight: 600;
    font-size: 16px;
}

.lesson-meta {
    color: #6b7280;
    font-size: 13px;
    margin-top: 2px;
}

.lesson-teacher {
    margin-top: 4px;
    color: #374151;
    font-size: 14px;
}