/* ============================================
   MAGENTA MANAGER - STILE UNIFICATO
   ============================================ */

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
    /* Rimuovo scroll-behavior per evitare interferenze con scroll del mouse */
    scroll-behavior: auto;
    /* Permetti scroll nativo senza interferenze */
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #e8eaf6 0%, #f3e5f5 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    /* Permetti scroll nativo senza interferenze */
    touch-action: pan-y;
}

@media (max-width: 768px) {
    body {
        padding: 15px;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Assicura che tutti gli elementi rispettino la larghezza dello schermo */
    * {
        max-width: 100%;
    }
    
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Assicura che breadcrumbs e logo-container non causino overflow */
    .breadcrumbs,
    .logo-container {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Media query per schermi molto piccoli (Galaxy S8, iPhone SE, ecc.) */
@media (max-width: 480px) {
    body {
        padding: 10px;
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .content-container {
        padding: 0 10px;
    }
    
    .breadcrumbs {
        padding: 10px 12px;
    }
    
    .logo-container {
        padding: 0 10px;
    }
    
    h1 {
        padding: 15px 10px;
        font-size: 1.6em;
    }
    
    .menu-box,
    .file-box,
    .cantiere-box {
        padding: 20px 15px;
    }
    
    /* Riduci gap nei grid per schermi piccoli */
    .menu-grid,
    .files-grid,
    .cantieri-grid {
        gap: 15px;
    }
    
    /* Assicura che nessun elemento abbia width fissa */
    table {
        width: 100% !important;
        max-width: 100%;
        display: block;
        overflow-x: auto;
    }
}

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: 40px;
    margin-top: 40px;
}

.logo {
    max-width: 300px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
        max-width: 100%;
    }
}

/* Container per pagine con molto testo (diario, programma, ecc.) */
.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
    box-sizing: border-box;
}

/* Titoli h1 dentro content-container (senza sfondo colorato) */
.content-container h1 {
    background: none;
    color: #1a1a1a;
    box-shadow: none;
    padding: 0;
    margin-top: 0;
    margin-bottom: 30px;
    text-shadow: none;
    text-align: left;
    font-size: 2em;
    border-bottom: 3px solid #333;
    padding-bottom: 10px;
}

/* Breadcrumbs e logo sono dentro container, quindi ereditano padding dal container */
/* Rimossi max-width e padding duplicati - ora gestiti dal container */

/* Breadcrumbs */
.breadcrumbs {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.breadcrumbs a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s;
    display: inline-block;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.breadcrumbs a:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.breadcrumbs a:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.breadcrumbs span {
    color: #666;
    margin: 0 4px;
    font-size: 0.9em;
}

/* Titoli */
h1 {
    text-align: center;
    color: white;
    font-size: 2.5em;
    margin-bottom: 40px;
    margin-top: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    padding: 30px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    margin-left: auto;
    margin-right: auto;
    max-width: 1200px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Rimuovi sfondo per h1 in index */
.index-page h1 {
    background: none;
    color: #333;
    box-shadow: none;
    padding: 0;
    margin-top: 20px;
    margin-bottom: 50px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

h2 {
    color: #2c3e50;
    margin-top: 30px;
    border-bottom: 2px solid #7f8c8d;
    padding-bottom: 5px;
    font-size: 1.5em;
}

h3 {
    color: #34495e;
    margin-top: 25px;
    font-size: 1.3em;
}

/* Menu Grid (per index e pagine simili) */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
    width: 100%;
    box-sizing: border-box;
}

/* Per index con 5 box - layout specifico (3 per riga su 1920px) */
.index-page .menu-grid {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

@media (max-width: 480px) {
    /* Per schermi molto piccoli, usa minmax più piccolo */
    .index-page .menu-grid {
        grid-template-columns: 1fr;
    }
    
    .menu-grid,
    .files-grid,
    .cantieri-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (min-width: 1920px) {
    /* Per index: 3 box affiancati (più grandi) */
    .index-page .menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Per altri menu-grid (cantieri con 4 box): 4 box affiancati */
    body:not(.index-page) .menu-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1400px) and (max-width: 1919px) {
    .index-page .menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    body:not(.index-page) .menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1000px) and (max-width: 1399px) {
    .index-page .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    body:not(.index-page) .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.menu-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
}

.menu-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.menu-box.cantieri {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.menu-box.amministrazione {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.menu-box.app {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.menu-box.manuali {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.menu-box.documentazione {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
    color: white;
}

.menu-box-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.menu-box-title {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.menu-box-description {
    font-size: 1.1em;
    opacity: 0.9;
}

/* Files Grid (per documentazione, manuali, ecc.) */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
    box-sizing: border-box;
}

.file-box {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
}

.file-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.file-icon {
    font-size: 3em;
    margin-bottom: 15px;
    text-align: center;
}

.file-title {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
    color: #333;
}

.file-description {
    color: #666;
    font-size: 0.95em;
    text-align: center;
}

/* Cantieri Grid */
.cantieri-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
    box-sizing: border-box;
}

.cantiere-box {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
}

.cantiere-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.cantiere-icon {
    font-size: 3em;
    margin-bottom: 15px;
    text-align: center;
}

.cantiere-title {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
    color: #333;
}

.cantiere-location {
    text-align: center;
    color: #666;
    font-size: 1.1em;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #667eea;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s;
    z-index: 1000;
    text-decoration: none;
    font-size: 24px;
}

.back-to-top:hover {
    background: #5568d3;
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.back-to-top.show {
    display: flex;
}

/* Stili per pagine con contenuto (diario, programma, ecc.) */
.content-page {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 20px auto;
    max-width: 1200px;
}

.content-page h1 {
    color: #1a1a1a;
    border-bottom: 3px solid #333;
    padding-bottom: 10px;
    margin-top: 0;
    font-size: 2em;
    text-align: left;
}

.content-page h2 {
    color: #2c3e50;
    margin-top: 30px;
    border-bottom: 2px solid #7f8c8d;
    padding-bottom: 5px;
    font-size: 1.5em;
}

.content-page h3 {
    color: #34495e;
    margin-top: 25px;
    font-size: 1.3em;
}

/* Note e Box informativi */
.note {
    font-style: italic;
    color: #666;
    margin-top: 20px;
    padding: 15px;
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 5px;
    margin-bottom: 20px;
}

.note p {
    margin-bottom: 10px;
}

.note ul {
    margin-top: 10px;
    margin-left: 20px;
}

/* Calcoli e risultati */
.calculation {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
    border-left: 4px solid #667eea;
}

.calculation h4 {
    margin-top: 0;
    color: #667eea;
    margin-bottom: 10px;
}

.calculation p {
    margin: 8px 0;
    line-height: 1.6;
}

.calculation .result {
    color: #28a745;
    font-size: 1.1em;
}

/* Tabelle con risultato evidenziato */
table tr.result {
    background-color: #e8f5e9;
    font-weight: bold;
}

table tr.highlight {
    background-color: #fff3cd;
    font-weight: bold;
}

/* Indice navigabile stile Wikipedia - Full Width */
.table-of-contents-full {
    background: #f8f9fa;
    border: 1px solid #a7d7f9;
    border-radius: 5px;
    padding: 20px 25px;
    margin: 25px 0;
    width: 100%;
    font-size: 0.95em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.table-of-contents-full .toc-title {
    font-weight: bold;
    font-size: 1.3em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #a7d7f9;
    color: #0645ad;
}

.table-of-contents-full .toc-section {
    margin-bottom: 25px;
}

.table-of-contents-full .toc-section:last-child {
    margin-bottom: 0;
}

.table-of-contents-full .toc-section-title {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 12px;
    margin-top: 0;
    color: #2c3e50;
    padding-bottom: 8px;
    border-bottom: 1px solid #ddd;
}

.table-of-contents-full .toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    line-height: 1.8;
}

.table-of-contents-full .toc-list > li {
    margin: 8px 0;
    padding-left: 20px;
    position: relative;
}

.table-of-contents-full .toc-list > li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #0645ad;
}

.table-of-contents-full .toc-list > li > a {
    color: #0645ad;
    text-decoration: none;
    font-weight: 500;
}

.table-of-contents-full .toc-list > li > a:hover {
    text-decoration: underline;
    color: #0b0080;
}

.table-of-contents-full .toc-list > li > a:visited {
    color: #0645ad;
}

.table-of-contents-full .toc-list ul {
    list-style: none;
    padding-left: 25px;
    margin: 8px 0;
}

.table-of-contents-full .toc-list ul li {
    margin: 5px 0;
    padding-left: 15px;
    position: relative;
}

.table-of-contents-full .toc-list ul li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #666;
}

.table-of-contents-full .toc-list ul li a {
    color: #0645ad;
    text-decoration: none;
    font-size: 0.95em;
}

.table-of-contents-full .toc-list ul li a:hover {
    text-decoration: underline;
    color: #0b0080;
}

/* Info lavorazione */
.lavorazione-info {
    background: #e8f4f8;
    border-left: 4px solid #3498db;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 5px;
}

.lavorazione-info p {
    margin: 8px 0;
}

/* Coefficient Box - Evidenziazione finale */
.coefficient-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: 30px;
    margin: 40px 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    color: white;
}

.coefficient-title {
    text-align: center;
    color: white;
    font-size: 1.8em;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    border: none;
    padding: 0;
    background: none;
    box-shadow: none;
}

.coefficient-values {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.coefficient-item {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    flex: 1;
    min-width: 250px;
    border: 2px solid rgba(255,255,255,0.3);
}

.coefficient-item.highlight-coefficient {
    background: rgba(255,255,255,0.25);
    border: 3px solid rgba(255,255,255,0.5);
    transform: scale(1.05);
}

.coefficient-label {
    font-size: 1.1em;
    margin-bottom: 15px;
    font-weight: 500;
    opacity: 0.9;
}

.coefficient-value {
    font-size: 2.5em;
    font-weight: bold;
    margin: 15px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.coefficient-note {
    font-size: 0.9em;
    opacity: 0.8;
    margin-top: 10px;
}

.coefficient-recommendation {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.2);
}

.coefficient-recommendation p {
    margin: 10px 0;
}

.coefficient-recommended {
    font-size: 1.2em;
    font-weight: bold;
    margin: 15px 0;
    text-align: center;
}

.coefficient-usage {
    font-size: 1em;
    line-height: 1.6;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

@media (max-width: 768px) {
    .table-of-contents-full {
        padding: 15px;
        font-size: 0.9em;
    }

    .coefficient-box {
        padding: 20px;
        margin: 30px 0;
    }

    .coefficient-title {
        font-size: 1.4em;
        margin-bottom: 20px;
    }

    .coefficient-values {
        flex-direction: column;
        gap: 20px;
    }

    .coefficient-item {
        min-width: 100%;
    }

    .coefficient-item.highlight-coefficient {
        transform: scale(1.02);
    }

    .coefficient-value {
        font-size: 2em;
    }

    .coefficient-recommended {
        font-size: 1.1em;
    }
}

.work-item {
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f5f5f5;
    border-left: 4px solid #34495e;
}

.work-item-extra {
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f5f5f5;
    border-left: 4px solid #e74c3c;
}

.section {
    margin: 25px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.requirement {
    background: white;
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.requirement h4 {
    margin-top: 0;
    color: #2c3e50;
}

.status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 0.85em;
    font-weight: bold;
    margin-left: 10px;
}

.status.required {
    background: #e74c3c;
    color: white;
}

.status.optional {
    background: #f39c12;
    color: white;
}

.status.installed {
    background: #27ae60;
    color: white;
}

.warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
}

.success {
    background: #d4edda;
    border-left: 4px solid #28a745;
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
}

.info {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
}

.toc {
    background: #ecf0f1;
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
}

.toc ul {
    list-style: none;
    padding-left: 0;
}

.toc li {
    margin: 8px 0;
}

.toc a {
    color: #3498db;
    text-decoration: none;
}

.toc a:hover {
    text-decoration: underline;
}

/* Code e Pre */
code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #e74c3c;
}

pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    border-left: 4px solid #3498db;
}

.file-structure {
    background: #ecf0f1;
    padding: 15px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    margin: 10px 0;
}

/* Liste e paragrafi */
ul, ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

li {
    margin-bottom: 8px;
}

p {
    margin-bottom: 10px;
}

hr {
    border: none;
    border-top: 2px solid #ddd;
    margin: 30px 0;
}

/* Link */
a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Tabelle */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

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

th {
    background-color: #34495e;
    color: white;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Media Queries */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8em;
        padding: 20px 15px;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .menu-grid,
    .files-grid,
    .cantieri-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .logo {
        max-width: 200px;
        width: 100%;
        height: auto;
    }
    
    .content-container {
        padding: 0 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .logo-container {
        margin-bottom: 30px;
        margin-top: 30px;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Riduci padding dei box su mobile */
    .menu-box {
        padding: 25px 20px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .file-box,
    .cantiere-box {
        padding: 25px 20px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Assicura che breadcrumbs non causino overflow */
    .breadcrumbs {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Breadcrumbs mobile-friendly */
    .breadcrumbs {
        padding: 12px 15px;
        gap: 6px;
    }
    
    .breadcrumbs a {
        padding: 12px 18px;
        font-size: 0.95em;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: rgba(102, 126, 234, 0.3);
    }
    
    .breadcrumbs span {
        margin: 0 2px;
        font-size: 0.85em;
    }
}

@media (min-width: 769px) and (max-width: 1199px) {
    .index-page .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Stili speciali per index.html */
body.index-page {
    display: flex;
    justify-content: center;
    align-items: center;
}

.index-page .container {
    max-width: 1400px;
}

.index-page .logo-container {
    margin-top: 40px;
}

.index-page .logo {
    max-width: 350px;
}

.index-page h1 {
    font-size: 2em;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .index-page .logo {
        max-width: 250px;
    }
}

/* Footer */
.site-footer {
    margin-top: 60px;
    padding: 20px 0;
    border-top: 1px solid #ddd;
    background: #f9f9f9;
    position: relative;
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.footer-content {
    flex: 1;
}

.footer-content p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
}

.footer-link {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.footer-link a {
    display: inline-block;
    padding: 5px 10px;
    font-size: 0.8em;
    color: #667eea;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.footer-link a:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .site-footer .container {
        flex-direction: column;
        text-align: center;
        padding: 20px 15px;
    }
    
    .footer-link {
        margin-top: 10px;
        margin-left: 0;
    }
}

/* Login Form */
.login-form {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.login-form h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2em;
    background: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    border: none !important;
}

.login-error {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #fcc;
}

.login-form input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.login-form input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
}

.login-form button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.login-form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.login-form button[type="submit"]:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .login-form {
        padding: 30px 20px;
    }
}

/* Notes Button */
.notes-button {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notes-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.3);
}

.notes-button:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .notes-button {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

/* Notes Modal */
.notes-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.notes-modal-content {
    background: white;
    border-radius: 10px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notes-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid #eee;
}

.notes-modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.8em;
}

.notes-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 1;
    transition: color 0.2s;
}

.notes-modal-close:hover {
    color: #333;
}

.notes-modal-body {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

.notes-modal-body textarea {
    width: 100%;
    min-height: 400px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.notes-modal-body textarea:focus {
    outline: none;
    border-color: #667eea;
}

.notes-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-top: 2px solid #eee;
}

.notes-save-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.notes-save-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.notes-save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.notes-status {
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .notes-modal-content {
        max-height: 95vh;
    }
    
    .notes-modal-header {
        padding: 15px 20px;
    }
    
    .notes-modal-header h2 {
        font-size: 1.5em;
    }
    
    .notes-modal-body {
        padding: 20px;
    }
    
    .notes-modal-body textarea {
        min-height: 300px;
        font-size: 14px;
    }
    
    .notes-modal-footer {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
    }
    
    .notes-save-btn {
        width: 100%;
    }
}
