/* ==========================================
   Fred Wolf Kundenportal
   ========================================== */

:root{
    --black:#000000;
    --line:#707070;
    --white:#ffffff;
    --bg:#fafafa;
    --blue:#3C4B9B;
}

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

html{
    scroll-behavior:smooth;
}

body{
    font-family:'Montserrat',sans-serif;
    background:var(--bg);
    color:var(--black);
    font-size:16px;
    line-height:1.7;
}

.site-header{
    padding:22px 60px;
    border-bottom:1px solid var(--line);
    background:#fff;
}

.site-logo{
    width:245px;
    height:auto;
    display:block;
}

.login-page{
    min-height:calc(100vh - 120px);
    display:flex;
    justify-content:center;
    align-items:center;
    padding:80px 20px;
}

.login-box{
    width:100%;
    max-width:560px;
    background:#fff;
    border:1px solid var(--line);
    padding:60px;
}

.eyebrow{
    font-size:14px;
    letter-spacing:4px;
    text-transform:uppercase;
    margin-bottom:20px;
}

h1{
    font-size:32px;
    font-weight:500;
    text-transform:uppercase;
    margin-bottom:25px;
}

.intro{
    margin-bottom:40px;
}

.login-form label{
    display:block;
    margin-bottom:10px;
    font-size:14px;
    text-transform:uppercase;
    letter-spacing:2px;
}

.login-form input{
    width:100%;
    height:56px;
    border:1px solid var(--line);
    padding:0 18px;
    margin-bottom:25px;
    border-radius:8px;
    font-family:inherit;
    font-size:16px;
}

.login-form input:focus{
    outline:none;
    border-color:#000;
}

.fw-button{
    width:100%;
    height:64px;
    background:#fff;
    border:1px solid #000;
    display:flex;
    justify-content:space-between;
    border-radius:8px;
    overflow:hidden;
    align-items:center;
    padding:0;
    cursor:pointer;
    transition:.25s;
    color:#000;
    font-family:'Montserrat',sans-serif;
}

.fw-button > span:first-child{
    flex:1;
    text-align:center;
    font-size:18px;
    font-family:'Montserrat',sans-serif;
    font-weight:400;
    text-transform:none;
    letter-spacing:0;
}

.fw-button-arrow{
    width:72px;
    height:100%;
    border-left:1px solid #000;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:34px;
    transition:.25s;
}

.fw-button:hover{
    background:#000;
    color:#fff;
}

.fw-button:hover .fw-button-arrow{
    background:#fff;
    color:#000;
}

.help-text{
    margin-top:30px;
    font-size:14px;
}

.error-message,
.success-message{
    background:#fff;
    border:1px solid var(--line);
    border-radius:8px;
    padding:14px 18px;
    margin-bottom:30px;
    font-size:14px;
    color:#000;
}

.login-error{
    display:flex;
    align-items:center;
    gap:8px;

    margin-top:-8px;
    margin-bottom:26px;

    color:var(--blue);
    font-size:14px;
    font-weight:500;
    line-height:1.4;
}

.login-error-icon{
    width:18px;
    height:18px;

    position:relative;
    top:-1px;

    stroke:var(--blue);
    fill:none;
    stroke-width:2;
    stroke-linecap:round;
    stroke-linejoin:round;

    flex-shrink:0;
}

/* ==========================================
   Dashboard
   ========================================== */

.portal-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.portal-logo-link{
    display:block;
}

.logout-link{
    display:flex;
    align-items:center;
    gap:10px;
    color:#000;
    text-decoration:none;
    font-size:16px;
    font-weight:400;
}

.logout-link:hover{
    text-decoration:underline;
}

.logout-icon{
    display:flex;
    align-items:center;
}

.dashboard-page{
    max-width:1100px;
    margin:0 auto;
    padding:80px 30px 100px;
}

.dashboard-intro{
    max-width:780px;
    margin-bottom:42px;
}

.dashboard-intro h1{
    font-size:32px;
    font-weight:500;
    text-transform:uppercase;
    margin-bottom:22px;
}

.dashboard-intro p{
    font-size:16px;
    line-height:1.8;
}

.dashboard-search{
    margin-bottom:46px;
}

.search-wrapper{
    position:relative;
}

.search-icon{
    position:absolute;
    left:22px;
    top:50%;
    transform:translateY(-50%);
    width:22px;
    height:22px;
    stroke:#777;
    fill:none;
    stroke-width:2;
    pointer-events:none;
}

.search-input{
    width:100%;
    height:58px;
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    padding:0 22px 0 58px;
    font-family:'Montserrat',sans-serif;
    font-size:16px;
    color:#000;
}

.search-input:focus{
    outline:none;
    border-color:#000;
}

.tile-grid{
    display:grid;
    grid-template-columns:repeat(2, 1fr);
    gap:28px;
}

.dashboard-tile{
    min-height:190px;
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    color:#000;
    text-decoration:none;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    transition:all .25s ease;
}

.dashboard-tile:hover{
    border-color:#000;
    transform:translateY(-3px);
    box-shadow:0 10px 25px rgba(0,0,0,.08);
}

.tile-title{
    font-size:18px;
    font-weight:500;
    text-transform:uppercase;
    letter-spacing:2px;
    margin-bottom:10px;
}

.tile-count{
    font-size:14px;
    color:#000;
}

.visually-hidden{
    position:absolute;
    width:1px;
    height:1px;
    padding:0;
    margin:-1px;
    overflow:hidden;
    clip:rect(0,0,0,0);
    border:0;
}

/* ==========================================
   Adminbereich
   ========================================== */

.admin-card{
    background:#fff;
    border:1px solid var(--line);
    border-radius:8px;
    padding:42px;
    margin-bottom:36px;
}

.admin-card h2{
    font-size:24px;
    font-weight:500;
    margin-bottom:32px;
}

.admin-backlink{
    margin-bottom:38px;
}

.admin-backlink a,
.text-link{
    color:var(--blue);
    text-decoration:none;
    font-weight:500;
    transition:.2s;
}

.admin-backlink a:hover,
.text-link:hover{
    text-decoration:underline;
}

.admin-form{
    display:flex;
    flex-direction:column;
    gap:22px;
    max-width:540px;
}

.admin-form label{
    display:block;
    margin-bottom:8px;
    font-size:14px;
    letter-spacing:2px;
    text-transform:uppercase;
}

.admin-form input,
.admin-form select{
    width:100%;
    height:58px;
    border:1px solid var(--line);
    border-radius:8px;
    padding:0 18px;
    font-family:'Montserrat',sans-serif;
    font-size:16px;
    color:#000;
    background:#fff;
}

.admin-form select{
    appearance:none;
    -webkit-appearance:none;
    -moz-appearance:none;
    padding-right:64px;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%233C4B9B' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:right 18px center;
    background-size:26px;
}

.admin-form input:focus,
.admin-form select:focus{
    outline:none;
    border-color:#000;
}

.admin-form .fw-button{
    width:420px;
    margin-top:12px;
}

.file-upload-input{
    display:none;
}

.upload-dropzone{
    width:100%;
    height:72px;
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;

    padding:5px 24px 0 24px;

    display:flex;
    flex-direction:column;
    justify-content:flex-start;
    gap:4px;

    cursor:pointer;
    transition:.2s;
}

.upload-dropzone:hover{
    border-color:var(--blue);
}

.upload-dropzone-title{
    display:flex;
    align-items:center;
    gap:10px;

    margin-top:4px;

    font-size:15px;
    font-weight:400;
    color:#000;

    letter-spacing:0;
    text-transform:none;
}

.upload-icon{
    width:20px;
    height:20px;
    stroke:var(--blue);
    fill:none;
    stroke-width:2;
    stroke-linecap:round;
    stroke-linejoin:round;
    flex-shrink:0;
}

#file-upload-text{
    font-size:13px;
    color:var(--line);
    letter-spacing:0;
    text-transform:none;
    padding-left:34px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.customer-list{
    display:flex;
    flex-direction:column;
    gap:16px;
}

.customer-item{
    background:#fff;
    border:1px solid var(--line);
    border-radius:8px;
    padding:24px 26px;
    display:flex;
    flex-direction:column;
    gap:6px;
}

.customer-item strong{
    font-size:18px;
    font-weight:500;
}

.customer-item span{
    font-size:15px;
    line-height:1.6;
}

/* ==========================================
   Dokumentenverwaltung: Filter, Tabelle, Löschen
   ========================================== */

.admin-filter-form{
    display:grid;
    grid-template-columns:repeat(4, 1fr);
    gap:18px;
    align-items:end;
    margin-bottom:26px;
}

.admin-filter-form label{
    display:block;
    margin-bottom:8px;
    font-size:12px;
    letter-spacing:1.8px;
    text-transform:uppercase;
}

.admin-filter-form input,
.admin-filter-form select{
    width:100%;
    height:50px;
    border:1px solid var(--line);
    border-radius:8px;
    padding:0 16px;
    font-family:'Montserrat',sans-serif;
    font-size:14px;
    color:#000;
    background:#fff;
}

.admin-filter-form select{
    appearance:none;
    -webkit-appearance:none;
    -moz-appearance:none;
    padding-right:48px;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%233C4B9B' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:right 14px center;
    background-size:22px;
}

.admin-small-button,
.admin-small-link{
    height:50px;
    border:1px solid #000;
    border-radius:8px;
    background:#fff;
    color:#000;
    padding:0 18px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-family:'Montserrat',sans-serif;
    font-size:14px;
    font-weight:400;
    text-decoration:none;
    cursor:pointer;
    transition:.2s;
}

.admin-small-button:hover,
.admin-small-link:hover{
    background:#000;
    color:#fff;
}

.admin-small-button-danger{
    color:var(--blue);
    border-color:var(--blue);
}

.admin-small-button-danger:hover{
    background:var(--blue);
    color:#fff;
}

.document-count{
    margin-bottom:22px;
    font-size:14px;
    color:#000;
}

.admin-bulk-actions{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:16px;
    margin-bottom:22px;
}

.admin-checkbox-label{
    display:flex;
    align-items:center;
    gap:8px;
    font-size:14px;
    letter-spacing:0 !important;
    text-transform:none !important;
    margin:0 !important;
}

.admin-table-wrapper{
    width:100%;
    overflow-x:auto;
}

.admin-table{
    width:100%;
    border-collapse:collapse;
    font-family:'Montserrat',sans-serif;
    font-size:14px;
}

.admin-table th{
    text-align:left;
    font-size:12px;
    letter-spacing:1.8px;
    text-transform:uppercase;
    font-weight:500;
    color:#000;
    border-bottom:1px solid var(--line);
    padding:0 18px 14px 0;
}

.admin-table td{
    border-bottom:1px solid #d8d8d8;
    padding:18px 18px 18px 0;
    vertical-align:top;
    color:#000;
}

.admin-table td strong{
    display:block;
    font-size:15px;
    font-weight:500;
    margin-bottom:4px;
}

.admin-table td span{
    display:block;
    font-size:13px;
    color:#707070;
    line-height:1.5;
}

.text-button-delete{
    appearance:none;
    border:0;
    background:transparent;
    padding:0;
    color:var(--blue);
    font-family:'Montserrat',sans-serif;
    font-size:14px;
    font-weight:500;
    cursor:pointer;
}

.text-button-delete:hover{
    text-decoration:underline;
}

@media (max-width:900px){
    .admin-filter-form{
        grid-template-columns:1fr 1fr;
    }
}

@media (max-width:768px){
    .admin-filter-form{
        grid-template-columns:1fr;
    }

    .admin-table{
        min-width:900px;
    }
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width:768px){

    .site-header{
        padding:30px;
    }

    .site-logo{
        width:240px;
    }

    .login-box{
        padding:35px;
    }

    h1,
    .dashboard-intro h1{
        font-size:28px;
    }

    .portal-header{
        align-items:flex-start;
        gap:24px;
    }

    .dashboard-page{
        padding:50px 20px 70px;
    }

    .tile-grid{
        grid-template-columns:1fr;
        gap:20px;
    }

    .admin-card{
        padding:28px;
    }

    .admin-form{
        max-width:100%;
    }

    .admin-form .fw-button{
        width:100%;
    }
}


/* ==========================================
   Dokumentenverwaltung: Filter, Tabelle, Löschen
   ========================================== */

.admin-filter-form{
    display:grid;
    grid-template-columns:repeat(4, 1fr);
    gap:18px;
    align-items:end;
    margin-bottom:26px;
}

.admin-filter-form label{
    display:block;
    margin-bottom:8px;
    font-size:12px;
    letter-spacing:1.8px;
    text-transform:uppercase;
}

.admin-filter-form input,
.admin-filter-form select{
    width:100%;
    height:50px;
    border:1px solid var(--line);
    border-radius:8px;
    padding:0 16px;
    font-family:'Montserrat',sans-serif;
    font-size:14px;
    color:#000;
    background:#fff;
}

.admin-filter-form select{
    appearance:none;
    -webkit-appearance:none;
    -moz-appearance:none;
    padding-right:48px;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%233C4B9B' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:right 14px center;
    background-size:22px;
}

.admin-small-button,
.admin-small-link{
    height:50px;
    border:1px solid #000;
    border-radius:8px;
    background:#fff;
    color:#000;
    padding:0 18px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-family:'Montserrat',sans-serif;
    font-size:14px;
    font-weight:400;
    text-decoration:none;
    cursor:pointer;
    transition:.2s;
}

.admin-small-button:hover,
.admin-small-link:hover{
    background:#000;
    color:#fff;
}

.admin-small-button-danger{
    color:var(--blue);
    border-color:var(--blue);
}

.admin-small-button-danger:hover{
    background:var(--blue);
    color:#fff;
}

.document-count{
    margin-bottom:22px;
    font-size:14px;
    color:#000;
}

.admin-bulk-actions{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:16px;
    margin-bottom:22px;
}

.admin-checkbox-label{
    display:flex;
    align-items:center;
    gap:8px;
    font-size:14px;
    letter-spacing:0 !important;
    text-transform:none !important;
    margin:0 !important;
}

.admin-table-wrapper{
    width:100%;
    overflow-x:auto;
}

.admin-table{
    width:100%;
    border-collapse:collapse;
    font-family:'Montserrat',sans-serif;
    font-size:14px;
}

.admin-table th{
    text-align:left;
    font-size:12px;
    letter-spacing:1.8px;
    text-transform:uppercase;
    font-weight:500;
    color:#000;
    border-bottom:1px solid var(--line);
    padding:0 18px 14px 0;
}

.admin-table td{
    border-bottom:1px solid #d8d8d8;
    padding:18px 18px 18px 0;
    vertical-align:top;
    color:#000;
}

.admin-table td strong{
    display:block;
    font-size:15px;
    font-weight:500;
    margin-bottom:4px;
}

.admin-table td span{
    display:block;
    font-size:13px;
    color:#707070;
    line-height:1.5;
}

.text-button-delete{
    appearance:none;
    border:0;
    background:transparent;
    padding:0;
    color:var(--blue);
    font-family:'Montserrat',sans-serif;
    font-size:14px;
    font-weight:500;
    cursor:pointer;
}

.text-button-delete:hover{
    text-decoration:underline;
}

@media (max-width:900px){
    .admin-filter-form{
        grid-template-columns:1fr 1fr;
    }
}

@media (max-width:768px){
    .admin-filter-form{
        grid-template-columns:1fr;
    }

    .admin-table{
        min-width:900px;
    }
}


/* ==========================================
   Kundenbereich: Dokumenten-Downloads
   ========================================== */

.customer-download-actions{
    justify-content:space-between;
    border-bottom:1px solid #d8d8d8;
    padding-bottom:22px;
}

.customer-download-footer{
    display:flex;
    flex-wrap:wrap;
    gap:16px;
    margin-top:26px;
}

.admin-small-button:disabled{
    opacity:.35;
    cursor:not-allowed;
}

.admin-small-button:disabled:hover{
    background:#fff;
    color:#000;
}


/* ==========================================
   Benutzerverwaltung
   ========================================== */

.password-generator-row{
    display:flex;
    gap:14px;
    align-items:center;
}

.password-generator-row input{
    flex:1;
    margin-bottom:0;
}

.password-generator-row .admin-small-button{
    white-space:nowrap;
}

@media (max-width:768px){
    .password-generator-row{
        flex-direction:column;
        align-items:stretch;
    }

    .password-generator-row .admin-small-button{
        width:100%;
    }
}


/* ==========================================
   Adminportal 3.0
   ========================================== */

.admin-action-links{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    align-items:center;
}

.admin-action-links form{
    display:inline;
}

.admin-card + .admin-card{
    margin-top:56px;
}

.admin-card:nth-of-type(2){
    border-top:2px solid #e7e7e7;
    padding-top:52px;
}

.upload-mode-options{
    display:flex;
    flex-wrap:wrap;
    gap:18px;
    margin-bottom:12px;
}

.upload-mode-options label{
    display:flex;
    align-items:center;
    gap:8px;
    letter-spacing:0 !important;
    text-transform:none !important;
    font-size:14px !important;
    margin-bottom:0 !important;
}

.upload-help{
    font-size:13px;
    color:#707070;
    line-height:1.6;
    margin-top:8px;
}



/* ==========================================
   Version 4.0 FINAL – Feinschliff
   ========================================== */

/* Einheitlicher Button-Pfeil als SVG statt Unicode */
.fw-button-arrow{
    font-size:0 !important;
    line-height:1;
    position:relative;
}

.fw-button-arrow::before{
    content:"";
    width:22px;
    height:22px;
    display:block;
    background-repeat:no-repeat;
    background-position:center;
    background-size:22px 22px;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M13 6l6 6-6 6'/%3E%3C/svg%3E");
}

.fw-button:hover .fw-button-arrow::before{
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M13 6l6 6-6 6'/%3E%3C/svg%3E");
}

/* Moderne, ruhige Checkboxen */
.admin-checkbox-label input,
.document-checkbox,
#select-all-documents{
    width:16px;
    height:16px;
    accent-color:var(--blue);
    cursor:pointer;
}

/* Kunden-Dashboard Icons */
.tile-icon{
    width:32px;
    height:32px;
    margin-bottom:18px;
    display:flex;
    align-items:center;
    justify-content:center;
}

.tile-icon svg{
    width:32px;
    height:32px;
    fill:none;
    stroke:#111;
    stroke-width:1.7;
    stroke-linecap:round;
    stroke-linejoin:round;
}

/* Aktionen in Tabellen */
.admin-action-links{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    align-items:center;
}

.admin-action-links form{
    display:inline;
}

/* Trennung zwischen Anlegen/Hochladen und Verwalten */
.admin-card + .admin-card{
    margin-top:56px;
}

.admin-card:nth-of-type(2){
    border-top:2px solid #e7e7e7;
    padding-top:52px;
}

/* Ordner-Upload */
.upload-mode-options{
    display:flex;
    flex-wrap:wrap;
    gap:18px;
    margin-bottom:12px;
}

.upload-mode-options label{
    display:flex;
    align-items:center;
    gap:8px;
    letter-spacing:0 !important;
    text-transform:none !important;
    font-size:14px !important;
    margin-bottom:0 !important;
}

.upload-mode-options input{
    width:16px !important;
    height:16px !important;
    accent-color:var(--blue);
}

.upload-help{
    font-size:13px;
    color:#707070;
    line-height:1.6;
    margin-top:8px;
}

/* Benutzerverwaltung */
.password-generator-row{
    display:flex;
    gap:14px;
    align-items:center;
}

.password-generator-row input{
    flex:1;
    margin-bottom:0;
}

.password-generator-row .admin-small-button{
    white-space:nowrap;
}

/* Kunden-Download Toolbar */
.customer-download-actions{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    border-bottom:1px solid #d8d8d8;
    padding-bottom:22px;
}

.document-count-strong{
    font-weight:500;
    color:#000;
}

.customer-download-footer{
    display:flex;
    flex-wrap:wrap;
    gap:16px;
    margin-top:26px;
}

.admin-small-button:disabled{
    opacity:.35;
    cursor:not-allowed;
}

.admin-small-button:disabled:hover{
    background:#fff;
    color:#000;
}

@media (max-width:768px){
    .password-generator-row{
        flex-direction:column;
        align-items:stretch;
    }

    .password-generator-row .admin-small-button{
        width:100%;
    }

    .customer-download-actions{
        align-items:flex-start;
        flex-direction:column;
    }
}



/* ==========================================
   Version 4.0.1 – Kunden-Dateiseiten Feinschliff
   ========================================== */

.customer-documents-card{
    border:1px solid var(--line) !important;
    padding-top:42px !important;
}

.link-arrow-back,
.link-arrow-forward{
    display:inline-flex;
    align-items:center;
    gap:8px;
}

.link-arrow-back::before{
    content:"";
    width:18px;
    height:18px;
    display:inline-block;
    background-repeat:no-repeat;
    background-position:center;
    background-size:18px 18px;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%233C4B9B' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5'/%3E%3Cpath d='M11 6l-6 6 6 6'/%3E%3C/svg%3E");
}

.link-arrow-forward::after{
    content:"";
    width:18px;
    height:18px;
    display:inline-block;
    background-repeat:no-repeat;
    background-position:center;
    background-size:18px 18px;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%233C4B9B' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M13 6l6 6-6 6'/%3E%3C/svg%3E");
}

.customer-download-actions{
    display:grid !important;
    grid-template-columns:1fr auto 1fr;
    align-items:center !important;
    gap:18px;
}

.customer-download-actions .admin-checkbox-label{
    justify-self:start;
}

.customer-download-actions .document-count{
    justify-self:center;
    margin-bottom:0;
}

.customer-download-actions .admin-small-link{
    justify-self:end;
}

@media (max-width:768px){
    .customer-download-actions{
        display:flex !important;
        flex-direction:column;
        align-items:flex-start !important;
    }

    .customer-download-actions .document-count,
    .customer-download-actions .admin-small-link{
        justify-self:start;
    }
}



/* ==========================================
   Version 4.0.2 – Rahmen, Pfeile, Tabellenfeinschliff
   ========================================== */

/* Admin- und Kundenkarten wieder mit sauberem einheitlichem Rahmen */
.admin-card{
    border:1px solid var(--line) !important;
    box-shadow:none !important;
}

/* Keine dicke obere Rahmenlinie mehr auf der zweiten Karte */
.admin-card:nth-of-type(2){
    border-top:1px solid var(--line) !important;
}

/* Abstand zwischen zwei Arbeitsbereichen bleibt erhalten */
.admin-card + .admin-card{
    margin-top:56px;
}

/* Einheitlicher SVG-Zurück-Pfeil für Kunden- und Adminbereich */
.admin-backlink a.link-arrow-back,
.link-arrow-back{
    display:inline-flex;
    align-items:center;
    gap:8px;
}

.admin-backlink a.link-arrow-back::before,
.link-arrow-back::before{
    content:"";
    width:18px;
    height:18px;
    display:inline-block;
    background-repeat:no-repeat;
    background-position:center;
    background-size:18px 18px;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%233C4B9B' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5'/%3E%3Cpath d='M11 6l-6 6 6 6'/%3E%3C/svg%3E");
}

/* Falls noch ein alter Textpfeil im Link steht, optisch neutral halten */
.admin-backlink a{
    color:var(--blue);
    text-decoration:none;
    font-weight:500;
}

/* Einheitlicher SVG-Vorwärtspfeil für Downloadlinks */
.link-arrow-forward{
    display:inline-flex;
    align-items:center;
    gap:8px;
}

.link-arrow-forward::after{
    content:"";
    width:18px;
    height:18px;
    display:inline-block;
    background-repeat:no-repeat;
    background-position:center;
    background-size:18px 18px;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%233C4B9B' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M13 6l6 6-6 6'/%3E%3C/svg%3E");
}



/* ==========================================
   Version 4.1 – Upload 2.0
   ========================================== */

.upload-2-panel{
    width:100%;
    min-height:210px;
    border:1px dashed var(--line);
    border-radius:8px;
    background:#fff;
    padding:34px 26px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:12px;
    text-align:center;
    transition:.2s;
}

.upload-2-panel.is-dragover{
    border-color:var(--blue);
    background:#f7f8ff;
}

.upload-2-panel strong{
    font-size:18px;
    font-weight:500;
}

.upload-2-panel > span{
    font-size:14px;
    color:#707070;
}

.upload-2-icon{
    width:38px;
    height:38px;
    color:#000;
}

.upload-2-icon svg{
    width:38px;
    height:38px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.7;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.upload-2-buttons{
    display:flex;
    flex-wrap:wrap;
    gap:14px;
    justify-content:center;
    margin:8px 0 4px;
}

.upload-progress-wrap{
    width:100%;
    margin:8px 0 4px;
}

.upload-progress-meta{
    display:flex;
    justify-content:space-between;
    gap:16px;
    font-size:14px;
    margin-bottom:10px;
}

.upload-progress-bar{
    width:100%;
    height:10px;
    border:1px solid var(--line);
    border-radius:999px;
    overflow:hidden;
    background:#fff;
}

.upload-progress-bar span{
    display:block;
    width:0;
    height:100%;
    background:var(--blue);
    transition:width .2s ease;
}

.upload-progress-current{
    margin-top:10px;
    font-size:13px;
    color:#707070;
}

.upload-result-box{
    width:100%;
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    padding:18px 20px;
    font-size:14px;
    line-height:1.7;
}

.upload-result-box details{
    margin-top:10px;
}

.upload-result-box ul{
    margin:8px 0 0 20px;
}

@media (max-width:768px){
    .upload-2-buttons{
        flex-direction:column;
        width:100%;
    }

    .upload-2-buttons .admin-small-button{
        width:100%;
    }

    .upload-progress-meta{
        flex-direction:column;
        gap:4px;
    }
}



/* ==========================================
   Version 4.2 – Ordnerverwaltung
   ========================================== */

.admin-table td strong{
    display:flex;
    align-items:center;
    gap:6px;
}

.admin-filter-form{
    grid-template-columns:repeat(4, 1fr);
}

@media (max-width:1100px){
    .admin-filter-form{
        grid-template-columns:repeat(2, 1fr);
    }
}

@media (max-width:768px){
    .admin-filter-form{
        grid-template-columns:1fr;
    }
}



/* ==========================================
   Version 4.2.1 – Ordner-Metadaten
   ========================================== */

.folder-row-title{
    display:flex;
    align-items:center;
    gap:8px;
}

.folder-row-meta{
    color:#707070;
    font-size:14px;
}



/* ==========================================
   Version 4.3 – Dokumentenverwaltung Pro
   ========================================== */

.admin-filter-form optgroup{
    font-weight:600;
    color:#000;
}

.admin-filter-form option{
    font-weight:400;
}

.folder-search-filter{
    display:none;
}

.category-filter{
    display:block;
}

.document-count{
    font-weight:500;
}

/* Ordner-Zeilen etwas ruhiger */
.folder-row-title{
    display:flex;
    align-items:center;
    gap:8px;
}

.folder-row-meta{
    color:#707070;
    font-size:14px;
}



/* ==========================================
   Version 4.3.2 – Kontext nach Aktionen behalten
   ========================================== */

#dokumente-verwalten,
#firmenliste,
#benutzerliste{
    scroll-margin-top:28px;
}



/* ==========================================
   Version 4.4 – Sichtbarkeit & Downloadstatus
   ========================================== */

#dokumente-hochladen,
#dokumente-verwalten{
    scroll-margin-top:28px;
}

.admin-inline-success{
    margin:18px 0 28px;
}

.download-status{
    display:inline-flex;
    flex-direction:column;
    gap:2px;
    font-size:13px;
    line-height:1.35;
    font-weight:500;
}

.download-status small{
    font-size:11px;
    font-weight:400;
    color:#707070;
}

.download-status-new{
    color:#707070;
}

.download-status-partial{
    color:var(--blue);
}

.download-status-done{
    color:var(--blue);
}



/* ==========================================
   Version 4.4.1 – Kein Springen + direkte Rückmeldung
   ========================================== */

.just-uploaded-list{
    margin-top:18px;
    padding-top:16px;
    border-top:1px solid #d8d8d8;
}

.just-uploaded-list ul{
    margin:10px 0 0 20px;
    max-height:220px;
    overflow:auto;
}

.inline-action-toast{
    position:fixed;
    right:24px;
    bottom:24px;
    z-index:9999;
    max-width:360px;
    padding:13px 17px;
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    color:#000;
    font-size:14px;
    font-weight:500;
    box-shadow:0 8px 28px rgba(0,0,0,.08);
    opacity:0;
    transform:translateY(10px);
    pointer-events:none;
    transition:opacity .18s ease, transform .18s ease;
}

.inline-action-toast.is-visible{
    opacity:1;
    transform:translateY(0);
}

@media (max-width:768px){
    .inline-action-toast{
        right:16px;
        left:16px;
        bottom:16px;
        max-width:none;
    }
}
