/*!
 * per gridview
 * <asp:Button ID="btnDelete" runat="server" Text="Elimina" CssClass="btn-modern btn-delete" />
 * <asp:GridView ID="GridView1" runat="server" CssClass="modern-grid">
 */

:root {
    --paolo-primary: #1f78d1;
    --paolo-primary-dark: #155fa7;
    --paolo-accent: #e7f1fb;
    --paolo-border: #d6e3f0;
    --paolo-text: #16324f;
    --paolo-muted: #5b7188;
    --paolo-row-alt: #f7fbff;
    --paolo-row-hover: #edf6ff;
    --paolo-success: #2f8f46;
    --paolo-success-dark: #256f37;
    --paolo-danger: #d94841;
    --paolo-danger-dark: #b9312b;
    --paolo-shadow: 0 10px 30px rgba(31, 120, 209, 0.08);
    --paolo-radius: 14px;
}

html {
    overflow-y: scroll;
}

body {
    overflow-x: hidden;
}

body#pageBody,
body.legacy-admin-page,
body.backoffice-menu-page {
    margin: 0;
    min-height: 100vh;
    background: #fff;
}

body#pageBody > .container,
body.legacy-admin-page > .container {
    width: 100% !important;
    max-width: none !important;
    padding-left: 18px;
    padding-right: 18px;
    box-sizing: border-box;
}

body#pageBody > .container > form,
body.legacy-admin-page > form,
body.legacy-admin-page > .container > form {
    margin: 0;
}

body.query-page #divMain,
body.query-page .span12 {
    width: 100%;
}

body.query-page .table-modern.filter-table,
body.query-page .modern-grid,
body.query-page .modern-grid table {
    width: 100% !important;
}

body.query-page .row-fluid,
body.query-page .row-fluid [class*="span"],
body.query-page #divMain {
    max-width: none !important;
    box-sizing: border-box;
}

.modern-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    color: var(--paolo-text);
    background: #fff;
    border: 1px solid var(--paolo-border);
    border-radius: var(--paolo-radius);
    overflow: hidden;
    box-shadow: var(--paolo-shadow);
}

.modern-grid th {
    background: linear-gradient(180deg, #f7fbff 0%, #e6f0fb 100%);
    color: var(--paolo-text);
    padding: 12px 14px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    border-bottom: 1px solid var(--paolo-border);
}

.modern-grid td {
    padding: 10px 14px;
    border-bottom: 1px solid #eef3f8;
    vertical-align: middle;
}

.modern-grid tr:nth-child(even) td {
    background: var(--paolo-row-alt);
}

.modern-grid tr:hover td {
    background: var(--paolo-row-hover);
}

.modern-grid tr:last-child td {
    border-bottom: none;
}

.modern-grid a {
    color: var(--paolo-primary-dark);
    font-weight: 600;
}

.modern-grid input[type="submit"],
.modern-grid input[type="button"],
.modern-grid button {
    margin: 0;
}

.btn-modern,
.table-modern input[type="submit"],
.table-modern input[type="button"],
.table-actions input[type="submit"],
.table-actions input[type="button"],
.filter-table input[type="submit"],
.filter-table input[type="button"],
.modern-grid input[type="submit"],
.modern-grid input[type="button"] {
    display: inline-block;
    border: 1px solid transparent;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
    margin-right: 5px;
    background: var(--paolo-primary);
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(31, 120, 209, 0.18);
}

.btn-modern:hover,
.table-modern input[type="submit"]:hover,
.table-modern input[type="button"]:hover,
.table-actions input[type="submit"]:hover,
.table-actions input[type="button"]:hover,
.filter-table input[type="submit"]:hover,
.filter-table input[type="button"]:hover,
.modern-grid input[type="submit"]:hover,
.modern-grid input[type="button"]:hover {
    background: var(--paolo-primary-dark);
    transform: translateY(-1px);
}

.btn-edit,
.btn-success {
    background: var(--paolo-success) !important;
    box-shadow: 0 6px 16px rgba(47, 143, 70, 0.18);
}

.btn-edit:hover,
.btn-success:hover {
    background: var(--paolo-success-dark) !important;
}

.btn-delete,
.btn-danger {
    background: var(--paolo-danger) !important;
    box-shadow: 0 6px 16px rgba(217, 72, 65, 0.18);
}

.btn-delete:hover,
.btn-danger:hover {
    background: var(--paolo-danger-dark) !important;
}

.table-modern,
.filter-table,
.table-actions {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    color: var(--paolo-text);
    background: #fff;
    border: 1px solid var(--paolo-border);
    border-radius: var(--paolo-radius);
    overflow: hidden;
    box-shadow: var(--paolo-shadow);
    margin-bottom: 18px;
}

.table-modern td,
.table-modern th,
.filter-table td,
.filter-table th,
.table-actions td,
.table-actions th {
    border-bottom: 1px solid #eef3f8;
    padding: 10px 12px;
    text-align: left;
    vertical-align: middle;
}

.table-modern tr:last-child td,
.filter-table tr:last-child td,
.table-actions tr:last-child td {
    border-bottom: none;
}

.table-modern th,
.filter-table th,
.table-actions th {
    background: linear-gradient(180deg, #f7fbff 0%, #e6f0fb 100%);
    color: var(--paolo-text);
    font-weight: 700;
}

.table-section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--paolo-primary-dark);
}

.section-title {
    color: var(--paolo-primary) !important;
    margin: 10px 0 12px;
}

.table-modern input[type="text"],
.table-modern input[type="password"],
.table-modern select,
.filter-table input[type="text"],
.filter-table input[type="password"],
.filter-table select,
.table-actions input[type="text"],
.table-actions input[type="password"],
.table-actions select {
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #c9d8e6;
    border-radius: 8px;
    box-sizing: border-box;
}

.table-modern input[disabled],
.table-actions input[disabled] {
    background: #f3f7fb;
    color: var(--paolo-muted);
}

.site-title {
    color: DodgerBlue !important;
}

.faq-block {
    margin-top: 12px;
}

.faq-item {
    margin: 0 0 10px;
    color: var(--paolo-text) !important;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
}

.new-anag-field input[type="date"] {
    flex: 1;
    min-width: 0;
    min-height: 34px;
    margin-bottom: 0;
    padding: 6px 10px;
    border: 1px solid #c9d8e6;
    border-radius: 8px;
    box-sizing: border-box;
    color: #16324f;
    background: #ffffff;
}

.new-anag-school-select {
    color: #111111 !important;
    font-size: 15px !important;
    font-weight: 600;
    background: #ffffff !important;
    border: 1px solid #b8cbe0 !important;
    box-shadow: inset 0 1px 2px rgba(22, 50, 79, 0.05);
}

.new-anag-note {
    margin-top: 10px;
    padding: 0 4px;
    color: #5b7188;
    font-size: 13px;
    line-height: 1.4;
}

.upload-doc-table td {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    vertical-align: middle;
    border: none !important;
    background: transparent !important;
}

.upload-doc-table {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

table.table-modern.filter-table.upload-doc-table,
table.table-modern.filter-table.upload-doc-table tbody,
table.table-modern.filter-table.upload-doc-table tr,
table.table-modern.filter-table.upload-doc-table td,
table.table-modern.filter-table.upload-doc-table th {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.upload-doc-table .td1 {
    width: 190px;
    font-weight: 700;
    color: #16324f;
    white-space: nowrap;
    border: none !important;
    background: transparent !important;
}

.upload-doc-table .td2 {
    width: auto;
    border: none !important;
    background: transparent !important;
}

.upload-doc-table input[type="text"] {
    width: 100%;
    margin-bottom: 0;
    border: 1px solid #c9d8e6 !important;
    box-shadow: none !important;
}

.upload-doc-table input[type="file"] {
    color: #16324f;
    width: 100%;
    max-width: 520px;
    min-height: 40px;
    padding: 6px 0;
}

.upload-doc-file {
    color: #16324f !important;
    width: 100% !important;
    max-width: 520px !important;
    min-height: 40px !important;
    padding: 6px 0 !important;
}

.upload-doc-table input[type="file"]::file-selector-button,
.upload-doc-file::file-selector-button {
    display: inline-block;
    border: 1px solid transparent !important;
    padding: 8px 14px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    margin-right: 10px !important;
    background: var(--paolo-primary) !important;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(31, 120, 209, 0.18) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.upload-doc-table input[type="file"]::file-selector-button:hover,
.upload-doc-file::file-selector-button:hover {
    background: var(--paolo-primary-dark) !important;
    transform: translateY(-1px);
}

.upload-doc-table input[type="file"]::-webkit-file-upload-button,
.upload-doc-file::-webkit-file-upload-button {
    display: inline-block;
    border: 1px solid transparent !important;
    padding: 8px 14px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    margin-right: 10px !important;
    background: var(--paolo-primary) !important;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(31, 120, 209, 0.18) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.upload-doc-table input[type="file"]::-webkit-file-upload-button:hover,
.upload-doc-file::-webkit-file-upload-button:hover {
    background: var(--paolo-primary-dark) !important;
    transform: translateY(-1px);
}

.upload-doc-shell {
    max-width: 900px;
}

.upload-doc-note {
    font-size: 12px;
    color: #5b7188;
    margin: 4px 0 10px;
}

.docsend-summary td {
    border: none !important;
}

.docsend-summary .label-cell {
    width: 58px;
    font-weight: 700;
    color: #16324f;
    white-space: nowrap;
    font-size: 14px;
}

.docsend-summary .label-cell span,
.docsend-grid .docsend-label span {
    color: #16324f !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.2;
}

.docsend-summary input[type="text"] {
    width: 100%;
    margin-bottom: 0;
    box-sizing: border-box;
}

.docsend-summary .docsend-primary-label {
    width: 128px !important;
}

.docsend-grid td {
    border: none !important;
    padding: 8px 10px !important;
}

.docsend-grid .docsend-label {
    width: 120px;
    font-weight: 700;
    color: #16324f;
    white-space: nowrap;
    font-size: 14px;
}

.docsend-grid .docsend-label span {
    color: #16324f !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}

.docsend-grid input[type="text"] {
    width: 100%;
    margin-bottom: 0;
    box-sizing: border-box;
}

.docsend-details td {
    border: none !important;
    padding: 8px 10px !important;
}

.docsend-details {
    border: 2px solid #bfd3e8 !important;
    box-shadow: 0 12px 28px rgba(22, 50, 79, 0.1) !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%) !important;
}

.docsend-inline-row {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.docsend-inline-row td {
    border: none !important;
    padding: 0 8px 0 0 !important;
    vertical-align: middle;
}

.docsend-inline-row .docsend-code-cell {
    width: 48px;
}

.docsend-inline-row .docsend-name-cell {
    width: 230px;
}

.docsend-inline-row .docsend-link-cell {
    width: auto;
}

.docsend-inline-row .docsend-send-cell {
    width: 170px;
    text-align: right;
}

.docsend-inline-row .docsend-code {
    width: 40px !important;
}

.docsend-inline-row .docsend-name {
    width: 220px !important;
}

.docsend-inline-row .docsend-link {
    width: 100% !important;
}

.docsend-page .table-section-title {
    font-size: 17px;
}

.docsend-page .table-modern td,
.docsend-page .table-modern label,
.docsend-page .table-modern h4 {
    font-size: 13px;
}

.docsend-page .table-modern input[type="text"] {
    font-size: 14px !important;
    min-height: 34px;
    padding-top: 5px;
    padding-bottom: 5px;
}

.docsend-page .modern-grid {
    font-size: 13px;
}

.docsend-page .modern-grid th {
    font-size: 12px;
    padding: 10px 12px;
}

.docsend-page .modern-grid td {
    font-size: 13px;
    padding: 8px 12px;
}

.docsend-docs-layout {
    display: grid;
    grid-template-columns: 185px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--paolo-border);
    border-radius: var(--paolo-radius);
    background: #fff;
    box-shadow: var(--paolo-shadow);
    box-sizing: border-box;
}

.docsend-docs-title {
    color: #16324f;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    padding-top: 10px;
}

.docsend-docs-grid {
    max-width: 100%;
}

/* Legacy admin tables kept for root pages that still use td1/td2/td3 */

.legacy-admin-page {
    background: #ffffff;
    color: #16324f;
    font-family: "Trebuchet MS", Verdana, sans-serif;
}

.legacy-admin-page form {
    padding: 10px;
    background-color: #ffffff;
    text-align: center;
    color: #000;
    min-height: 100%;
}

.legacy-admin-page #box2 {
    margin: 10px 0 16px;
}

.legacy-admin-page .sottotitolo {
    margin: 0 0 6px;
    color: #516477;
    font-size: 14px;
    line-height: 1.45;
}

.legacy-admin-page .td1,
.legacy-admin-page .td2 {
    border: 1px solid #aebfce;
    background: #fff;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 12px;
    color: #000;
    vertical-align: middle;
    padding: 6px 8px;
}

.legacy-admin-page .td1 {
    text-align: right;
}

.legacy-admin-page .td2 {
    text-align: left;
}

.legacy-admin-page .td3 {
    padding: 25px;
}
