html {
    --page-scale: 1;
    --scaled-page-min-height: 100vh;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", "Tahoma", "Geneva", sans-serif;
    font-size: 12px;
    color: #1e1e1e;

    display: flex;
    justify-content: center;
    min-height: var(--scaled-page-min-height);
    overflow-x: hidden;
}

a {
    color: #0044cc;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    font-weight: 600;
}
.banners-index {
  display: flex;
  justify-content: center;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  margin-block-end: 20px;
}

a:hover {
    color: #002288;
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(255, 255, 255, 1);
}

.site-container {
    width: 95%;
    max-width: 960px; 
    margin: 40px auto; 
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    zoom: var(--page-scale);
}

@supports not (zoom: 1) {
    .site-container {
        transform: scale(var(--page-scale));
        transform-origin: top center;
    }
}
.graphical-banner, .block, footer {
    /* Стекло: полупрозрачный белый + размытие фона */
    background: rgba(240, 250, 255, 0.45); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);

    /* Границы и тени */
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.graphical-banner::before, .block::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 40%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.1) 100%);
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    pointer-events: none;
}

.graphical-banner {
    height: 100px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
}

.banner-left {
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2;
}
.site-name-text {
    font-size: 28px;
    font-weight: 400;
    color: #003366;
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
    font-family: "Segoe UI Light", "Segoe UI", sans-serif;
}

.top-nav {
    display: flex;
    gap: 10px;
    z-index: 2;
}

.graphical-nav-btn {
    padding: 6px 15px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.8) 0%, rgba(220,230,240,0.8) 50%, rgba(190,210,230,0.8) 51%, rgba(240,250,255,0.8) 100%);
    border: 1px solid #7a9bb9;
    border-radius: 4px;
    color: #1e1e1e;
    text-shadow: 0 1px 0 rgba(255,255,255,1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    font-weight: normal;
}

.graphical-nav-btn:hover {
    background: linear-gradient(to bottom, #fff 0%, #eef 50%, #dde 51%, #fff 100%);
    box-shadow: 0 0 5px rgba(255,255,255,0.8);
    text-decoration: none;
}

.main-layout {
    display: flex;
    gap: 20px;
    min-height: 400px;
}

aside {
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

main {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.block {
    padding-bottom: 10px;
}

.block-title {
    background: linear-gradient(to bottom, rgba(255,255,255,0.8) 0%, rgba(200,225,255,0.6) 100%);
    padding: 8px 12px;
    font-weight: bold;
    color: #003366;
    border-bottom: 1px solid rgba(255,255,255,0.4);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.block-content {
    padding: 10px;
}

/* МЕНЮ */
ul.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

ul.menu-list li {
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
ul.menu-list li:last-child {
    border-bottom: none;
}

ul.menu-list li a {
    display: block;
    color: #222;
    padding: 6px 5px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

ul.menu-list li a:hover {
    color: #0044cc;
    padding-left: 20px;
    background: linear-gradient(to right, rgba(255,255,255,0), rgba(180, 220, 255, 0.4));
    border-radius: 0 4px 4px 0;
}

ul.menu-list li a.active {
    color: #003399;
    font-weight: bold;
    padding-left: 20px;
    background: linear-gradient(to right, rgba(255,255,255,0.2), rgba(180, 220, 255, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 0 4px 4px 0;
    box-shadow: inset 0 0 5px rgba(255,255,255,0.8);
}

ul.menu-list li a::before {
    content: "►";
    position: absolute;
    left: 5px; top: 9px; font-size: 8px;
    color: #0044cc;
    opacity: 0;
    transition: opacity 0.2s;
}

ul.menu-list li a:hover::before,
ul.menu-list li a.active::before {
    opacity: 1;
}

input[type="text"], input[type="password"] {
    width: 90%;
    padding: 5px;
    border: 1px solid #abadb3;
    margin-bottom: 5px;
    border-radius: 2px;
    font-family: inherit;
}

.login-btn {
    padding: 4px 10px;
    cursor: pointer;
    background: #f0f0f0;
    border: 1px solid #999;
    border-radius: 2px;
}

/* ==========================================================================
   6. КОНТЕНТ
   ========================================================================== */
.welcome-bar {
    background: rgba(235, 245, 255, 0.6);
    border: 1px solid #a3c0e4;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    color: #003366;
}

.entry {
    background: rgba(255,255,255,0.9);
    border: 1px solid #c0d0e0;
    border-radius: 3px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.entry-header {
    background: linear-gradient(to bottom, rgba(210, 235, 255, 0.8) 0%, rgba(180, 220, 255, 0.4) 100%);
    border-bottom: 1px solid #b0c0d0;
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.entry-title {
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.arrow-icon {
    display: inline-block;
    width: 0; 
    height: 0; 
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 5px solid #0055aa;
    margin-right: 8px;
}

.entry-date {
    font-size: 10px;
    color: #666;
}

.entry-body {
    padding: 15px;
    line-height: 1.5;
    color: #333;
}

.entry-footer {
    background: #f4f8fc;
    border-top: 1px solid #e0e0e0;
    padding: 5px 10px;
    font-size: 10px;
    color: #777;
    text-align: right;
}

.gdrive-window .entry-body {
    padding: 0;
}

.gdrive-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.9) 0%, rgba(225,240,255,0.75) 100%);
    border-bottom: 1px solid #c0d0e0;
}

.gdrive-address {
    flex: 1;
    min-width: 0;
    padding: 5px 8px;
    color: #224466;
    background: rgba(255,255,255,0.9);
    border: 1px solid #a8bfd8;
    border-radius: 3px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gdrive-open-link {
    padding: 5px 12px;
    color: #123456;
    background: linear-gradient(to bottom, #ffffff 0%, #dcecff 50%, #c8e0f8 51%, #f4fbff 100%);
    border: 1px solid #7a9bb9;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    font-weight: normal;
}

.gdrive-open-link:hover {
    text-decoration: none;
    color: #003399;
}

.gdrive-open-link[aria-disabled="true"] {
    opacity: 0.55;
    pointer-events: none;
}

.file-catalog {
    min-height: 420px;
    padding: 14px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.82);
    border-top: 1px solid #d6e4f2;
}

/* ШАПКА ТАБЛИЦЫ С ФАЙЛАМИ */
.file-catalog-head {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 120px 100px;
    align-items: end;
    gap: 12px;
    padding: 0 10px 8px;
    color: #777;
    border-bottom: 1px solid #cbd8e6;
    text-transform: uppercase;
}

.file-name-head {
    grid-column: 2 / 3;
    color: #003366;
    font-weight: bold;
}

.file-date-head {
    grid-column: 3 / 4;
    display: block;
    text-align: left;
}

/* СТРОКИ С ФАЙЛАМИ */
.file-row {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 120px 100px;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    padding: 7px 10px;
    color: #1e1e1e;
    border-bottom: 1px solid #d9e3ee;
    font-weight: normal;
    transition: all 0.18s ease-in-out;
}

.file-row:hover {
    color: #003399;
    text-decoration: none;
    background: linear-gradient(to bottom, rgba(235, 247, 255, 0.95) 0%, rgba(204, 232, 255, 0.75) 100%);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.85);
}

.file-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    max-width: 20px;
    max-height: 20px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2));
}

.file-name {
    grid-column: 2 / 3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-date {
    grid-column: 3 / 4; 
    color: #666;
    white-space: nowrap;
    display: block;
    text-align: left;
}

.file-action {
    grid-column: 4 / 5;
    justify-self: end;
    text-align: center;
    width: 80px; /* Фиксируем ширину самой кнопки */
    padding: 4px 0;
    color: #123456;
    background: linear-gradient(to bottom, #ffffff 0%, #dcecff 50%, #c8e0f8 51%, #f4fbff 100%);
    border: 1px solid #7a9bb9;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    display: block;
}

footer {
    margin-top: 20px;
    padding: 15px;
    text-align: center;
    color: #444;
    font-size: 11px;
    text-shadow: 0 1px 0 rgba(255,255,255,0.6);
}

/* ==========================================================================
   7. КАЛЕНДАРЬ
   ========================================================================== */
.win7-calendar {
    font-family: "Segoe UI", sans-serif;
    background: rgba(0, 50, 100, 0.6); 
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 10px;
    
    color: #ffffff;
    text-align: center;
    user-select: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
}

.cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 0 5px;
}

#cal-month-year {
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    cursor: default;
}

.cal-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #ffffff;
    font-weight: bold;
    cursor: pointer;
    border-radius: 3px;
    width: 24px;
    height: 24px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cal-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    font-size: 11px;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 0.7);
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}

.cal-day {
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 2px;
    font-size: 12px;
    transition: all 0.1s;
    color: #ffffff;
}

.cal-day:not(.other-month):hover {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9) 0%, rgba(200, 230, 255, 0.9) 100%);
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    color: #000000;
    text-shadow: none;
}

.cal-day.other-month {
    color: rgba(255, 255, 255, 0.3);
}

.cal-day.today {
    background: linear-gradient(to bottom, rgba(255,255,255,0.9) 0%, rgba(200, 235, 255, 0.9) 100%);
    border: 1px solid #7da2ce;
    font-weight: bold;
    color: #1e1e1e;
    text-shadow: none;
    box-shadow: 0 0 5px rgba(255,255,255,0.5);
}

.cal-today-link {
    margin-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 8px;
    font-size: 11px;
}

.cal-today-link a {
    color: #8bbfff;
}
.cal-today-link a:hover {
    color: #ffffff;
}

@media (max-width: 900px) {
    .site-container {
        width: calc(100% - 24px);
        margin: 24px auto;
    }

    .main-layout {
        flex-direction: column;
        gap: 16px;
    }

    aside {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
        gap: 16px;
    }

    main {
        padding: 16px;
    }

    .graphical-banner {
        padding: 0 20px;
    }

    .banners-index {
        position: static;
        margin-top: 24px;
        margin-bottom: 0;
    }

    .banners-index > div {
        flex-wrap: wrap;
        justify-content: center;
    }

    .file-catalog {
        min-height: 360px;
        padding: 10px;
    }

    .file-catalog-head {
        grid-template-columns: 22px minmax(0, 1fr) 100px 90px;
        gap: 8px;
        padding: 0 8px 8px;
    }

    .file-row {
        grid-template-columns: 22px minmax(0, 1fr) 100px 90px;
        gap: 8px;
        padding: 7px 8px;
    }
}

@media (max-width: 640px) {
    body {
        background-attachment: scroll !important;
    }

    .site-container {
        width: calc(100% - 16px);
        margin: 8px auto 16px;
    }

    .graphical-banner {
        height: auto;
        min-height: 0;
        justify-content: center;
        padding: 12px;
        text-align: center;
    }

    .banner-left {
        flex-direction: column;
        justify-content: center;
        gap: 6px;
    }

    .banner-left img {
        height: 82px !important;
        padding-top: 0 !important;
    }

    .site-name-text {
        font-size: 22px;
        line-height: 1.15;
    }

    aside {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    main {
        padding: 10px;
    }

    .welcome-bar {
        display: block;
        line-height: 1.45;
    }

    .entry-header {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 4px 10px;
    }

    .entry-title {
        min-width: 0;
    }

    .gdrive-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
    }

    .gdrive-address {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    #file-search {
        width: 100% !important;
        box-sizing: border-box;
    }

    .file-catalog {
        min-height: 300px;
        padding: 8px;
    }

    .file-catalog-head {
        display: none;
    }

    .file-row {
        grid-template-columns: 22px minmax(0, 1fr);
        grid-template-rows: auto auto auto;
        align-items: start;
        gap: 4px 8px;
        min-height: 0;
        padding: 9px 8px;
    }

    .file-name {
        grid-column: 2 / 3;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .file-date {
        grid-column: 2 / 3;
    }

    .file-action {
        grid-column: 2 / 3;
        justify-self: start;
        margin-top: 2px;
    }

    .banners-index {
        align-items: center;
        gap: 12px;
        margin-top: 20px;
    }

    .banners-index img {
        max-width: calc(100vw - 44px);
        height: auto;
    }
}