/* MOB365 CompanyEdit - global CSS */
.company-edit-page {
    width: 100%;
    max-width: 1700px;
    margin: 0 auto;
    padding-bottom: 48px;
    color: var(--bc-text)
}

    .company-edit-page .page-head {
        display: flex;
        justify-content: space-between;
        gap: 24px;
        margin-bottom: 24px
    }

.back-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    padding: 0 16px;
    border: 1px solid #dbe4ef;
    border-radius: 4px;
    background: #fff;
    color: #334155;
    text-decoration: none;
    font-size: 12px;
    font-weight: 850
}

.company-edit-loading, .company-edit-empty {
    display: flex;
    min-height: 230px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    padding: 32px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15,23,42,.07)
}

.company-edit-alert {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    padding: 15px 17px;
    border: 1px solid;
    border-radius: 4px
}

.company-edit-alert-icon {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 9px;
    color: #fff;
    font-weight: 950
}

.company-edit-alert.success {
    color: #166534;
    border-color: #bbf7d0;
    background: #f0fdf4
}

    .company-edit-alert.success .company-edit-alert-icon {
        background: #16a34a
    }

.company-edit-alert.danger {
    color: #991b1b;
    border-color: #fecaca;
    background: #fff1f2
}

    .company-edit-alert.danger .company-edit-alert-icon {
        background: #dc2626
    }

.company-edit-panel {
    overflow: hidden;
    margin-bottom: 22px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 14px 38px rgba(15,23,42,.065)
}

.company-edit-panel-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    border-bottom: 1px solid #edf2f7;
    background: #f8fafc
}

.company-edit-kicker {
    display: block;
    margin-bottom: 6px;
    color: var(--bc-accent);
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .13em
}

.company-edit-form {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 17px;
    padding: 24px
}

    .company-edit-form > div {
        min-width: 0
    }

    .company-edit-form label:not(.company-edit-check) {
        display: block;
        margin-bottom: 7px;
        color: #334155;
        font-size: 11px;
        font-weight: 850
    }

    .company-edit-form input, .company-edit-form select {
        width: 100%;
        min-height: 45px;
        padding: 0 13px;
        border: 1px solid #dbe4ef;
        border-radius: 4px;
        background: #fff;
        outline: none;
        font-family: inherit;
        font-size: 13px
    }

        .company-edit-form input:focus, .company-edit-form select:focus {
            border-color: var(--bc-accent);
            box-shadow: 0 0 0 4px rgba(0, 139, 139,.10)
        }

.company-edit-check {
    display: flex !important;
    min-height: 45px;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    border: 1px solid #dbe4ef;
    border-radius: 4px;
    background: #f8fafc;
    font-size: 11px;
    font-weight: 600
}

    .company-edit-check input {
        width: 17px !important;
        height: 17px;
        accent-color: var(--bc-accent)
    }

.company-edit-primary-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 17px;
    border: 0;
    border-radius: 4px;
    color: #fff;
    background: linear-gradient(135deg,var(--bc-accent),var(--bc-accent));
    font-weight: 600;
    cursor: pointer
}

    .company-edit-primary-button:disabled {
        opacity: .62
    }

.company-edit-table-wrap {
    width: 100%;
    overflow-x: auto
}

.company-edit-table {
    width: 100%;
    border-collapse: collapse
}

    .company-edit-table th {
        padding: 13px 17px;
        color: #64748b;
        background: #f8fafc;
        text-align: left;
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase
    }

    .company-edit-table td {
        padding: 15px 17px;
        border-top: 1px solid #f1f5f9;
        font-size: 12px
    }

.company-edit-license-status {
    display: inline-flex;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600
}

    .company-edit-license-status.ok {
        color: #047857;
        background: #d1fae5
    }

    .company-edit-license-status.warn {
        color: #92400e;
        background: #fef3c7
    }

    .company-edit-license-status.bad {
        color: #b91c1c;
        background: #fee2e2
    }

@media(max-width:1100px) {
    .company-edit-form {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }
}

@media(max-width:650px) {
    .company-edit-page .page-head {
        flex-direction: column
    }

    .company-edit-form {
        grid-template-columns: 1fr;
        padding: 18px
    }

    .company-edit-panel-header {
        flex-direction: column
    }
    .company-head-actions {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
    }
}

.company-modules-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px;padding:24px}.company-module-card{border:1px solid #d9e2ef;border-radius: 4px;padding:16px;background:#f8fafc}.company-module-card.enabled{border-color:#315cf4;background:#f4f7ff;box-shadow:0 8px 24px rgba(49,92,244,.10)}.company-module-toggle,.company-module-default{display:flex;align-items:center;gap:10px}.company-module-toggle span{display:flex;flex-direction:column;gap:3px}.company-module-toggle small{color:#667085}.company-module-default{margin-top:14px;font-size:13px;color:#475467}.company-modules-actions{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:0 24px 24px}@media(max-width:760px){.company-modules-actions{flex-direction:column;align-items:stretch}}


/* R139 - Business Central module selector */
.company-modules-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;padding:0;border-bottom:1px solid #edebe9;background:#fff;}
.company-module-card{min-height:76px;padding:13px 15px;border:0;border-right:1px solid #edebe9;border-bottom:1px solid #edebe9;border-radius:0;background:#fff;box-shadow:none;}
.company-module-card.enabled{border-color:#edebe9;background:#f3f9f8;box-shadow:inset 3px 0 0 #008272;}
.company-module-toggle,.company-module-default{gap:8px;}
.company-module-toggle input,.company-module-default input{accent-color:#008272;}
.company-module-toggle span{gap:1px;}
.company-module-toggle strong{color:#242424;font-size:13px;font-weight:600;}
.company-module-toggle small{color:#605e5c;font-size:10px;}
.company-module-default{margin-top:9px;color:#605e5c;font-size:11px;}
.company-modules-actions{padding:12px 15px;gap:18px;border-top:0;background:#faf9f8;}
.company-modules-actions small{max-width:1000px;color:#605e5c;font-size:11px;line-height:1.45;}
.company-modules-actions .company-edit-primary-button{min-height:34px;border-radius:2px;background:#008272;box-shadow:none;}
@media(max-width:1000px){.company-modules-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:650px){.company-modules-grid{grid-template-columns:1fr;}}

/* MOB365 Faza 4.1 – Company Overview (read-only) */
.company-overview { background:#fff; border:1px solid #dbe4e9; border-radius: 4px; padding:20px; margin:16px 0 24px; }
.company-overview-title h2 { margin:0 0 5px; font-size:20px; color:#17334b; }
.company-overview-title p { margin:0 0 18px; color:#64748b; font-size:13px; }
.company-overview-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.company-overview-card { border:1px solid #dbe4e9; background:#f8fafb; border-radius:8px; padding:15px; display:flex; flex-direction:column; gap:7px; min-width:0; }
.company-overview-card span { font-size:12px; color:#64748b; }
.company-overview-card strong { font-size:20px; color:#17334b; overflow-wrap:anywhere; }
.company-overview-card small { color:#64748b; }
.company-overview-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:16px; }
.company-overview-actions a { display:inline-block; border:1px solid #b8dadd; color:#087e83; border-radius:6px; padding:9px 12px; text-decoration:none; font-weight:600; font-size:13px; }
.company-overview-actions a:hover { background:#e9f5f5; }
@media(max-width:900px) { .company-overview-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:520px) { .company-overview-grid { grid-template-columns:1fr; } .company-overview { padding:14px; } }

/* Faza 4.2 – Business Central 365 company command bar and module finder */
.company-commandbar{display:flex;flex-wrap:wrap;gap:0;background:#fff;border:1px solid #edebe9;border-radius:4px;margin:16px 0;position:sticky;top:0;z-index:5;box-shadow:0 2px 7px #102b3b0d}
.company-commandbar a{padding:12px 16px;color:#323130;font-size:13px;font-weight:600;text-decoration:none;border-right:1px solid #edebe9}
.company-commandbar a:hover,.company-commandbar a:focus-visible{background:#e5f3f1;color:#006b60;outline-offset:-2px}
.company-modules-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:13px 16px;background:#faf9f8;border-top:1px solid #edebe9}
.company-modules-toolbar label{font-size:12px;font-weight:600;color:#605e5c}
.company-modules-toolbar input,.company-modules-toolbar select{min-height:34px;border:1px solid #b8b5b2;border-radius:3px;background:#fff;padding:6px 9px;color:#242424;font-size:13px}
.company-modules-toolbar input{min-width:210px;flex:1;max-width:350px}
.company-module-count{margin-left:auto;color:#605e5c;font-size:12px}
#company-overview,#company-details,#company-modules,#company-license,#company-database{scroll-margin-top:75px}
@media(max-width:650px){.company-commandbar{position:static}.company-commandbar a{padding:10px}.company-module-count{margin-left:0}}

/* Faza 4.5: tab-e të thjeshta, pa tabela të dyfishta. */
.company-commandbar button{appearance:none;background:transparent;border:0;border-right:1px solid #edebe9;padding:12px 16px;color:#323130;font:inherit;font-size:13px;font-weight:600;cursor:pointer}
.company-commandbar button:hover,.company-commandbar button:focus-visible{background:#e5f3f1;color:#006b60}
.company-commandbar button.active{color:#007e83;background:#e5f3f1;box-shadow:inset 0 -3px #008b8c}
@media(max-width:650px){.company-commandbar button{padding:10px 12px}}

.company-overview-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:1000px){.company-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.company-overview-grid{grid-template-columns:1fr}}

/* R51 — Business Central inspired database workspace */
#company-database { --db365-blue:#0f6cbd; --db365-border:#d9e2ec; background:#fff; border:1px solid var(--db365-border); border-radius: 4px; }
#company-database .company-edit-panel-header { border-bottom:1px solid var(--db365-border); padding-bottom:18px; margin-bottom:20px; }
#company-database .company-edit-panel-header h2 { font-size:1.35rem; letter-spacing: 0; }
#company-database .company-edit-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 20px; }
#company-database .company-edit-form > div:not(.db365-advanced):not(.db365-readonly-status) { min-width:0; }
#company-database .company-edit-form label { font-size:.86rem; font-weight:600; color:#344054; }
#company-database .company-edit-form input:not([type=checkbox]), #company-database .company-edit-form select { width:100%; max-width:100%; border:1px solid #b9c8d7; border-radius:5px; min-height:40px; padding:8px 10px; }
#company-database .company-edit-form input:focus-visible, #company-database .company-edit-form select:focus-visible { outline:2px solid var(--db365-blue); outline-offset:1px; }
#company-database .db365-advanced { grid-column:1/-1; padding:12px 16px; border:1px solid var(--db365-border); border-radius:6px; background:#f8fafc; }
#company-database .db365-advanced summary { cursor:pointer; font-weight:600; color:#254f76; }
#company-database .db365-advanced > div, #company-database .db365-advanced > label { display:block; margin-top:12px; }
#company-database .db365-hint { color:#58677b; font-size:.85rem; margin:10px 0; }
#company-database .db365-readonly-status { background:#eef5fc; border-left:3px solid var(--db365-blue); padding:10px 14px; }
#company-database .db365-readonly-status small { display:block; margin-top:5px; color:#526477; }
#company-database .company-edit-form > button[type=submit] { justify-self:start; align-self:end; background:var(--db365-blue); color:white; border-radius:5px; }
@media(max-width:680px) { #company-database .company-edit-form { grid-template-columns:minmax(0,1fr); } }
