/* AbrHesab Dashboard V3 - Modern Financial UI */

.dashboard-v3{
    display:flex;
    flex-direction:column;
    gap:18px;
    padding:8px 0 20px;
}

/* Header */

.dashboard-v3-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    background:#fff;
    border:1px solid #dceaf1;
    border-radius:20px;
    padding:22px;
    box-shadow:0 8px 25px rgba(20,70,100,.06);
}

.dashboard-v3-title{
    font-size:26px;
    font-weight:900;
    color:#12384c;
}

.dashboard-v3-subtitle{
    margin-top:8px;
    color:#708896;
    font-size:13px;
}


/* KPI */

.dashboard-v3-kpis{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:15px;
}


.dashboard-v3-card{
    background:#fff;
    border:1px solid #dceaf1;
    border-radius:18px;
    padding:18px;
    display:flex;
    align-items:center;
    gap:15px;
    box-shadow:0 8px 20px rgba(20,70,100,.05);
}


.dashboard-v3-icon{
    width:52px;
    height:52px;
    border-radius:15px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#eef8fc;
    font-size:25px;
}


.dashboard-v3-card span{
    display:block;
    color:#758995;
    font-size:12px;
}


.dashboard-v3-card strong{
    display:block;
    margin-top:6px;
    font-size:22px;
    color:#12384c;
}


/* Main panels */

.dashboard-v3-grid{
    display:grid;
    grid-template-columns:2fr 1fr;
    gap:18px;
}


.dashboard-v3-panel{
    background:#fff;
    border:1px solid #dceaf1;
    border-radius:18px;
    overflow:hidden;
}


.dashboard-v3-panel-header{
    padding:16px;
    background:#f8fcfe;
    border-bottom:1px solid #e6f0f4;
    font-weight:900;
    color:#16465b;
}


/* Quick actions */

.dashboard-v3-actions{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:10px;
    padding:15px;
}


.dashboard-v3-action{
    border:1px solid #d9e9f1;
    background:#fff;
    border-radius:12px;
    padding:12px;
    cursor:pointer;
    font-weight:800;
    color:#16506b;
}


.dashboard-v3-action:hover{
    background:#eef8fc;
}


/* Responsive */

@media(max-width:1100px){

.dashboard-v3-kpis{
    grid-template-columns:repeat(2,1fr);
}

.dashboard-v3-grid{
    grid-template-columns:1fr;
}

}


@media(max-width:650px){

.dashboard-v3-kpis{
    grid-template-columns:1fr;
}

.dashboard-v3-header{
    flex-direction:column;
    align-items:flex-start;
}

}

/* AbrHesab Dashboard V3 Components */

.dashboard-v3 .card{
    background:#fff;
    border:1px solid #dceaf1;
    border-radius:18px;
    padding:18px;
    box-shadow:0 8px 22px rgba(20,70,100,.05);
}

.dashboard-v3 .section-title{
    font-size:14px;
    font-weight:900;
    color:#173f52;
    margin-bottom:8px;
}

.dashboard-v3 .quick-actions{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:12px;
}

.dashboard-v3 .quick-action{
    display:flex;
    align-items:center;
    gap:10px;
    padding:7px;
    border:1px solid #dceaf1;
    border-radius:14px;
    background:#fbfeff;
    cursor:pointer;
    transition:.2s;
}

.dashboard-v3 .quick-action:hover{
    transform:translateY(-2px);
    border-color:#55b9e8;
}

.dashboard-v3 .quick-action span{
    font-size:24px;
}

.dashboard-v3 .financial-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:12px;
}

.dashboard-v3 .financial-card{
    padding:16px;
    border-radius:16px;
    background:#fff;
    border:1px solid #dceaf1;
}

.dashboard-v3 .financial-card label{
    display:block;
    font-size:11px;
    color:#708496;
}

.dashboard-v3 .financial-card strong{
    display:block;
    margin-top:8px;
    font-size:20px;
    color:#173f52;
}

@media(max-width:900px){
    .dashboard-v3 .quick-actions,
    .dashboard-v3 .financial-grid{
        grid-template-columns:repeat(2,1fr);
    }
}

@media(max-width:600px){
    .dashboard-v3 .quick-actions,
    .dashboard-v3 .financial-grid{
        grid-template-columns:1fr;
    }
}


/* Dashboard V3 Quick Actions */

.dashboard-v3-panel{
    margin-top:18px;
    background:#ffffff;
    border:1px solid #dceaf1;
    border-radius:18px;
    padding:18px;
    box-shadow:0 8px 24px rgba(20,70,100,.06);
}

.dashboard-v3-panel-title{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:14px;
}

.dashboard-v3-panel-title b{
    font-size:15px;
    color:#173f52;
    font-weight:900;
}

.dashboard-v3-panel-title small{
    color:#82949c;
    font-size:11px;
}

.dashboard-v3-actions{
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:12px;
}

.dashboard-v3-action{
    border:1px solid #dceaf1;
    background:linear-gradient(135deg,#ffffff,#f6fbfd);
    border-radius:16px;
    min-height:90px;
    cursor:pointer;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    gap:8px;
    font-family:inherit;
    font-size:12px;
    font-weight:800;
    color:#173f52;
    transition:.2s;
}

.dashboard-v3-action span{
    font-size:28px;
}

.dashboard-v3-action:hover{
    transform:translateY(-3px);
    box-shadow:0 10px 24px rgba(20,70,100,.12);
    border-color:#9cc9da;
}

@media(max-width:1200px){
    .dashboard-v3-actions{
        grid-template-columns:repeat(3,1fr);
    }
}

@media(max-width:700px){
    .dashboard-v3-actions{
        grid-template-columns:repeat(2,1fr);
    }
}


/* Dashboard V3 Financial Cards */

.dashboard-v3 .dash-balance-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px;
    margin-top:18px;
}

.dashboard-v3 .dash-panel{
    background:#fff;
    border:1px solid #dceaf1;
    border-radius:18px;
    padding:18px;
    box-shadow:0 8px 22px rgba(20,70,100,.05);
}


.dashboard-v3 .dash-panel-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:10px;
}


.dashboard-v3 .dash-panel-head b{
    color:#173f52;
    font-size:15px;
    font-weight:900;
}


.dashboard-v3 .dash-panel-head small{
    display:block;
    color:#8b9ca3;
    font-size:11px;
    margin-top:3px;
}


.dashboard-v3 .dash-total{
    background:linear-gradient(135deg,#f4fbfd,#ffffff);
    border-radius:14px;
    padding:7px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:8px;
}


.dashboard-v3 .dash-total span{
    color:#71858d;
    font-size:12px;
}


.dashboard-v3 .dash-total b{
    color:#14627d;
    font-size:18px;
}


.dashboard-v3 .dash-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:7px;
    border-bottom:1px solid #edf3f6;
}


.dashboard-v3 .dash-row:last-child{
    border-bottom:none;
}


.dashboard-v3 .dash-row span{
    color:#314d5b;
    font-weight:700;
}


.dashboard-v3 .dash-row b{
    color:#173f52;
}


@media(max-width:800px){
    .dashboard-v3 .dash-balance-grid{
        grid-template-columns:1fr;
    }
}


/* Dashboard V3 Quick Actions */

.dashboard-v3-actions{
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:14px;
    margin-top:14px;
}

.dashboard-v3-action{
    border:1px solid #dceaf1;
    background:linear-gradient(135deg,#ffffff,#f7fbfd);
    border-radius:18px;
    min-height:72px;
    cursor:pointer;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:8px;
    color:#173f52;
    font-size:13px;
    font-weight:900;
    transition:.2s;
    box-shadow:0 8px 20px rgba(20,70,100,.05);
}

.dashboard-v3-action span{
    font-size:28px;
}

.dashboard-v3-action:hover{
    transform:translateY(-3px);
    border-color:#9fd2e8;
    box-shadow:0 12px 28px rgba(20,70,100,.12);
}


@media(max-width:1100px){
    .dashboard-v3-actions{
        grid-template-columns:repeat(3,1fr);
    }
}


@media(max-width:700px){
    .dashboard-v3-actions{
        grid-template-columns:repeat(2,1fr);
    }
}


/* Dashboard V3 Management Alerts */

.dashboard-v3-alerts{
    margin-top:18px;
    background:#fff;
    border:1px solid #dceaf1;
    border-radius:18px;
    padding:18px;
    box-shadow:0 8px 22px rgba(20,70,100,.05);
}

.dashboard-v3-alert-title{
    display:flex;
    justify-content:space-between;
    margin-bottom:10px;
}

.dashboard-v3-alert-title b{
    display:block;
    color:#173f52;
    font-size:15px;
    font-weight:900;
}

.dashboard-v3-alert-title small{
    display:block;
    color:#8b9ca3;
    font-size:11px;
    margin-top:4px;
}


.dashboard-v3-alert-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
}


.dashboard-v3-alert{
    display:flex;
    align-items:center;
    gap:12px;
    min-height:85px;
    padding:7px;
    border:1px solid #e1edf3;
    border-radius:16px;
    background:linear-gradient(135deg,#ffffff,#f7fbfd);
}


.dashboard-v3-alert span{
    font-size:28px;
}


.dashboard-v3-alert b{
    display:block;
    color:#173f52;
    font-size:13px;
    font-weight:900;
}


.dashboard-v3-alert small{
    display:block;
    color:#80939b;
    font-size:10px;
    margin-top:5px;
}


@media(max-width:1100px){
    .dashboard-v3-alert-grid{
        grid-template-columns:repeat(2,1fr);
    }
}


@media(max-width:700px){
    .dashboard-v3-alert-grid{
        grid-template-columns:1fr;
    }
}


/* ABRHESAB MOBILE INVOICE FIX V1 */
@media (max-width: 640px) {
  #modal .invoice-print-area {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  #modal .invoice-top-party {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  #modal .invoice-top-party > *,
  #modal .party-box,
  #modal .invoice-lines {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  #modal .invoice-table-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  #modal .invoice-table {
    min-width: 760px;
    width: 760px;
    table-layout: auto;
  }

  #modal .invoice-table th,
  #modal .invoice-table td {
    white-space: normal;
    overflow-wrap: anywhere;
    padding: 7px 6px;
  }

  #modal .invoice-summary {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px;
  }

  #modal .invoice-head {
    flex-wrap: wrap;
    gap: 10px;
  }

  #modal .invoice-head .actions {
    width: 100%;
    flex-wrap: wrap;
  }

  #modal .invoice-head .actions .btn,
  #modal .invoice-lines .panelhead .btn {
    max-width: 100%;
    white-space: normal;
  }
}

/* ABRHESAB MOBILE INVOICE INPUTS V1 */
@media (max-width: 640px) {
  #modal .invoice-table {
    width: 920px;
    min-width: 920px;
    table-layout: auto;
  }

  #modal .invoice-table th,
  #modal .invoice-table td {
    padding: 8px 7px !important;
    vertical-align: middle;
  }

  #modal .invoice-table input:not([type="checkbox"]):not([type="radio"]),
  #modal .invoice-table select,
  #modal .invoice-table textarea {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 88px !important;
    min-height: 44px !important;
    height: auto;
    padding: 9px 7px !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
  }

  #modal .invoice-table td:nth-child(2) input,
  #modal .invoice-table td:nth-child(2) select {
    min-width: 155px !important;
  }

  #modal .invoice-table td:nth-child(3) input,
  #modal .invoice-table td:nth-child(5) input,
  #modal .invoice-table td:nth-child(7) input,
  #modal .invoice-table td:nth-child(8) input {
    min-width: 95px !important;
  }

  #modal .invoice-table button {
    min-height: 42px;
    min-width: 40px;
    padding: 8px !important;
  }
}
