/*
Theme Name: MAPRI Portal
Theme URI: https://mapri.si/
Description: Interni portal za zaposlene podjetja Mapri Proasfalt d.o.o.
Author: Roxon
Template: astra
Version: 1.0.0
Text Domain: mapri-portal
*/

/* =========================
   FORM WRAPPER
========================= */

.mapri-form-wrap {
    max-width: 820px;
    margin: 40px auto;
    padding: 0 16px;
}

.mapri-form-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 34px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    transition: 0.3s ease;
}

.mapri-form-card:hover {
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.12);
}

.mapri-form-header h2 {
    margin: 0 0 6px;
    font-size: 30px;
    font-weight: 800;
    color: #0f172a;
}

.mapri-form-header p {
    margin: 0 0 26px;
    color: #64748b;
    font-size: 14px;
}

.mapri-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.mapri-field-full {
    grid-column: 1 / -1;
}

.mapri-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    font-size: 14px;
    color: #0f172a;
}

.mapri-field input,
.mapri-field select,
.mapri-employee-search {
    width: 100%;
    min-height: 48px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px 14px;
    background: #ffffff;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
    transition: 0.2s ease;
}

.mapri-field input:focus,
.mapri-field select:focus,
.mapri-employee-search:focus {
    border-color: #0f172a;
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.mapri-field input:hover,
.mapri-field select:hover,
.mapri-employee-search:hover {
    border-color: #1e293b;
}

.mapri-field select {
    font-weight: 600;
}

.mapri-field select:invalid {
    color: #94a3b8;
}

.mapri-field small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
}

/* =========================
   EMPLOYEE AJAX SEARCH
========================= */

.mapri-employee-search-field {
    position: relative;
}

.mapri-employee-results {
    display: none;
    position: relative;
    z-index: 20;
    margin-top: 6px;
    width: 100%;
}

.mapri-employee-results.is-visible {
    display: block;
}

.mapri-employee-result {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 14px;
    border: 0;
    border-radius: 8px;
    background: #0f172a;
    color: #ffffff;
    cursor: pointer;
    text-align: left;
}

.mapri-employee-result:hover {
    background: #1e293b;
}

.mapri-employee-result strong {
    display: block;
    font-size: 14px;
    line-height: 1.2;
    color: #ffffff;
}

.mapri-employee-result span {
    display: block;
    font-size: 12px;
    line-height: 1.2;
    color: #cbd5e1;
}

.mapri-employee-muted {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e5e7eb;
    cursor: default;
}

/* =========================
   UPLOAD BOX
========================= */

.mapri-upload-box {
    display: block;
    border: 2px dashed #94a3b8;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.mapri-upload-box:hover {
    background: #f1f5f9;
    border-color: #0f172a;
    transform: translateY(-2px);
}

.mapri-upload-box::before {
    content: "📄";
    font-size: 28px;
    display: block;
    margin-bottom: 10px;
}

.mapri-upload-box input {
    display: none;
}

.mapri-upload-title {
    display: block;
    font-weight: 700;
    font-size: 14px;
    color: #0f172a;
}

.mapri-upload-subtitle {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
}

/* =========================
   BUTTONS
========================= */

.mapri-form-actions {
    margin-top: 28px;
}

.mapri-btn-primary,
.mapri-dashboard-btn,
.mapri-month-filter button {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 14px 26px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.mapri-btn-primary:hover,
.mapri-dashboard-btn:hover,
.mapri-month-filter button:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.2);
}

.mapri-btn-primary:active {
    transform: scale(0.98);
}

.mapri-btn-primary.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* =========================
   ALERTS
========================= */

.mapri-alert {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.mapri-alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.mapri-alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* =========================
   USER TABLE
========================= */

.mapri-placilne-liste table {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-collapse: collapse;
}

.mapri-placilne-liste th {
    background: #f8fafc;
    font-weight: 700;
}

.mapri-placilne-liste td,
.mapri-placilne-liste th {
    padding: 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.mapri-placilne-liste tr:hover {
    background: #f9fafb;
}

/* =========================
   ACCOUNTING DASHBOARD
========================= */

.mapri-dashboard,
.mapri-monthly-dashboard {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 16px;
}

.mapri-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.mapri-dashboard-header h2 {
    margin: 0 0 6px;
    font-size: 30px;
    font-weight: 800;
    color: #0f172a;
}

.mapri-dashboard-header p {
    margin: 0;
    color: #64748b;
}

.mapri-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.mapri-stat-card,
.mapri-dashboard-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
}

.mapri-stat-card {
    padding: 24px;
}

.mapri-stat-card span {
    display: block;
    color: #64748b;
    font-size: 14px;
    margin-bottom: 8px;
}

.mapri-stat-card strong {
    display: block;
    color: #0f172a;
    font-size: 34px;
    line-height: 1;
}

.mapri-dashboard-card {
    padding: 26px;
}

.mapri-dashboard-card h3 {
    margin: 0 0 18px;
    font-size: 22px;
    color: #0f172a;
}

.mapri-dashboard-table-wrap {
    overflow-x: auto;
}

.mapri-dashboard-table {
    width: 100%;
    border-collapse: collapse;
}

.mapri-dashboard-table th,
.mapri-dashboard-table td {
    padding: 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
}

.mapri-dashboard-table th {
    background: #f8fafc;
    color: #0f172a;
    font-weight: 800;
}

.mapri-dashboard-table td span {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-top: 3px;
}

/* =========================
   BADGES
========================= */

.mapri-badge {
    display: inline-flex !important;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px !important;
    font-weight: 800;
}

.mapri-badge-active {
    background: #dcfce7;
    color: #166534 !important;
}

.mapri-badge-expired {
    background: #fee2e2;
    color: #991b1b !important;
}

.mapri-badge-neutral {
    background: #e5e7eb;
    color: #374151 !important;
}

/* =========================
   MONTHLY FILTER
========================= */

.mapri-month-filter {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 14px;
    align-items: end;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
}

.mapri-month-filter label {
    display: block;
    font-weight: 800;
    margin-bottom: 6px;
    color: #0f172a;
}

.mapri-month-filter select,
.mapri-month-filter input {
    width: 100%;
    min-height: 48px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px 14px;
    color: #0f172a;
    background: #ffffff;
    box-sizing: border-box;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 800px) {
    .mapri-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .mapri-dashboard-stats,
    .mapri-month-filter {
        grid-template-columns: 1fr;
    }

    .mapri-dashboard-btn,
    .mapri-month-filter button {
        width: 100%;
    }
}

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

    .mapri-form-card {
        padding: 22px;
    }

    .mapri-form-header h2,
    .mapri-dashboard-header h2 {
        font-size: 24px;
    }

    .mapri-btn-primary {
        width: 100%;
    }
}
/* =========================
   CSS za gumb “Dodaj”
========================= */
.mapri-link-action {
    display: inline-flex;
    margin-top: 8px;
    padding: 7px 10px;
    border-radius: 8px;
    background: #0f172a;
    color: #ffffff !important;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.mapri-link-action:hover {
    background: #1e293b;
    color: #ffffff !important;
}

/* =========================
   LOGIN PAGE
========================= */
.mapri-login-wrap {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.mapri-login-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 34px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.mapri-login-header h1 {
    margin: 0 0 8px;
    font-size: 30px;
    font-weight: 800;
    color: #0f172a;
}

.mapri-login-header p {
    margin: 0 0 26px;
    color: #64748b;
    font-size: 14px;
}

#mapri-loginform p {
    margin-bottom: 16px;
}

#mapri-loginform label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    color: #0f172a;
}

#mapri-loginform input[type="text"],
#mapri-loginform input[type="password"] {
    width: 100%;
    min-height: 48px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px 14px;
    color: #0f172a;
}

#mapri-loginform input[type="submit"] {
    width: 100%;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 14px 26px;
    font-weight: 800;
    cursor: pointer;
}

.mapri-login-footer {
    margin-top: 18px;
    text-align: center;
}

.mapri-login-footer a {
    color: #0f172a;
    font-weight: 700;
    text-decoration: none;
}

.mapri-badge-viewed {
    background: #dbeafe;
    color: #1d4ed8;
}

.mapri-badge-not-viewed {
    background: #fef3c7;
    color: #92400e;
}

.mapri-dashboard-table td span {
    display: block;
    margin-top: 4px;
    font-size: 12px;
}
.mapri-badge-viewed {
    background: #dbeafe;
    color: #1d4ed8 !important;
}

.mapri-badge-not-viewed {
    background: #fef3c7;
    color: #92400e !important;
}