/* === IMS-Audit Portal — Custom Styles === */

:root {
    --ims-olive: #a0b535;
    --ims-olive-hover: #8fa02e;
    --ims-dark: #4a4a4a;
    --ims-muted: #7a8b8b;
    --ims-bg: #f5f5f5;
    --ims-border: #e0e0e0;
}

body {
    background-color: var(--ims-bg);
    color: var(--ims-dark);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* === Login-Seite === */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--ims-bg);
}

.login-card {
    background: white;
    border: 1px solid var(--ims-border);
    border-radius: 4px;
    padding: 40px;
    width: 400px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.login-logo {
    text-align: center;
    margin-bottom: 20px;
}

.login-logo svg {
    height: 40px;
}

.login-title {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.login-subtitle {
    text-align: center;
    color: var(--ims-muted);
    font-size: 14px;
    margin-bottom: 25px;
}

.login-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--ims-border);
    border-radius: 3px;
    font-size: 14px;
    margin-bottom: 15px;
    background-color: #fafafa;
}

.login-input:focus {
    outline: none;
    border-color: var(--ims-olive);
}

.btn-ims {
    background-color: var(--ims-olive);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    text-transform: uppercase;
}

.btn-ims:hover {
    background-color: var(--ims-olive-hover);
    color: white;
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid var(--ims-border);
    font-size: 12px;
    color: var(--ims-muted);
}

.login-footer a {
    color: var(--ims-olive);
    text-decoration: none;
}

/* === Top Navbar === */
.ims-navbar {
    background: white;
    border-bottom: 1px solid var(--ims-border);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ims-navbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--ims-dark);
    font-size: 18px;
    font-weight: 600;
}

.ims-navbar-brand svg {
    height: 28px;
}

.ims-navbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
}

.ims-navbar-user {
    font-weight: 600;
    color: var(--ims-dark);
}

/* === Content Area === */
.ims-content {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.ims-content-card {
    background: white;
    border: 1px solid var(--ims-border);
    border-radius: 4px;
    padding: 30px;
}

/* === Welcome Section === */
.ims-welcome h2 {
    font-size: 28px;
    font-weight: 300;
    color: var(--ims-dark);
    margin-bottom: 5px;
}

.ims-welcome .subtitle {
    color: var(--ims-muted);
    font-size: 16px;
    margin-bottom: 25px;
}

.ims-section-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.ims-section-desc {
    color: var(--ims-olive);
    font-size: 14px;
    margin-bottom: 10px;
}

.ims-breadcrumb {
    font-size: 14px;
    color: var(--ims-muted);
    margin-bottom: 15px;
}

.ims-breadcrumb strong {
    color: var(--ims-dark);
}

/* === Table Styles === */
.ims-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ims-table th {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 2px solid var(--ims-border);
    color: var(--ims-muted);
    font-weight: 600;
    font-size: 13px;
}

.ims-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #f0f0f0;
}

.ims-table tr:hover {
    background-color: #fafafa;
}

/* === Status Badges === */
/* === Status Filter Buttons === */
.btn-filter {
    padding: 6px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    color: #666;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-filter:hover {
    background: #f5f5f5;
}

.btn-filter.active {
    background: #4a4a4a;
    color: #fff;
    border-color: #4a4a4a;
}

.btn-filter.filter-new.active {
    background: #999;
    border-color: #999;
}

.btn-filter.filter-draft.active {
    background: var(--ims-olive);
    border-color: var(--ims-olive);
}

.btn-filter.filter-completed.active {
    background: #5cb85c;
    border-color: #5cb85c;
}

.filter-count {
    display: inline-block;
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 0 7px;
    font-size: 12px;
    margin-left: 4px;
}

.btn-filter.active .filter-count {
    background: rgba(255,255,255,0.25);
}

.badge-draft {
    background-color: var(--ims-olive);
    color: white;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.badge-created {
    background-color: #999;
    color: white;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.badge-completed {
    background-color: #5cb85c;
    color: white;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

/* === Action Buttons (Text - Legacy) === */
.btn-edit {
    display: inline-block;
    background: none;
    border: 1px solid var(--ims-border);
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ims-dark);
    cursor: pointer;
    text-transform: uppercase;
    text-decoration: none;
}

.btn-edit:hover {
    background-color: #f0f0f0;
    color: var(--ims-dark);
    text-decoration: none;
}

.btn-complete {
    display: inline-block;
    background-color: var(--ims-olive);
    border: none;
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    text-transform: uppercase;
    text-decoration: none;
}

.btn-complete:hover {
    background-color: var(--ims-olive-hover);
    color: white;
    text-decoration: none;
}

/* === Action Buttons (Icons) === */
.action-buttons {
    white-space: nowrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.15s, color 0.15s;
}

.btn-action + .btn-action {
    margin-left: 4px;
}

.btn-view {
    color: var(--ims-dark);
    border: 1px solid var(--ims-border);
}

.btn-view:hover {
    background-color: #f0f0f0;
    color: var(--ims-dark);
    text-decoration: none;
}

.btn-edit-icon {
    color: #0d6efd;
    border: 1px solid #0d6efd;
}

.btn-edit-icon:hover {
    background-color: #0d6efd;
    color: white;
    text-decoration: none;
}

.btn-complete-icon {
    color: var(--ims-olive);
    border: 1px solid var(--ims-olive);
}

.btn-complete-icon:hover {
    background-color: var(--ims-olive);
    color: white;
    text-decoration: none;
}

.btn-back {
    background: none;
    border: 1px solid var(--ims-border);
    padding: 8px 16px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ims-dark);
    cursor: pointer;
    text-transform: uppercase;
}

.btn-update {
    background-color: var(--ims-olive);
    border: none;
    padding: 8px 20px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    text-transform: uppercase;
}

.btn-update:hover {
    background-color: var(--ims-olive-hover);
}

/* === Measure Edit: Tabs === */
.ims-tabs {
    display: flex;
    border-bottom: 2px solid var(--ims-border);
    margin-bottom: 0;
}

.ims-tab {
    padding: 12px 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--ims-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    text-align: center;
}

.ims-tab:hover {
    color: var(--ims-dark);
}

.ims-tab.active {
    color: var(--ims-olive);
    border-bottom-color: var(--ims-olive);
}

.ims-tab-icon {
    display: block;
    margin-bottom: 4px;
    font-size: 18px;
}

/* === Measure Header === */
.measure-header {
    margin-bottom: 20px;
}

.measure-header h3 {
    font-size: 22px;
    font-weight: 400;
    margin-bottom: 5px;
}

.measure-meta {
    display: flex;
    gap: 40px;
    font-size: 13px;
    color: var(--ims-muted);
    margin-top: 15px;
    flex-wrap: wrap;
}

.measure-meta dt {
    font-weight: normal;
    font-size: 12px;
}

.measure-meta dd {
    font-weight: 600;
    color: var(--ims-dark);
    margin: 0;
}

.measure-standard-badge {
    display: inline-block;
    border: 1px solid var(--ims-border);
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    margin-top: 10px;
}

/* === Pagination === */
.ims-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    font-size: 13px;
    color: var(--ims-muted);
}

.ims-page-sizes {
    display: flex;
    gap: 5px;
}

.ims-page-size {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--ims-muted);
}

.ims-page-size.active {
    background-color: var(--ims-olive);
    color: white;
}

/* === Footer === */
.ims-footer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: var(--ims-muted);
    margin-top: 30px;
}

.ims-footer a {
    color: var(--ims-olive);
    text-decoration: none;
}

/* === Bestätigungs-Modal === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.ims-modal-dialog {
    background: white;
    border-radius: 8px;
    width: 480px;
    min-width: 380px;
    max-width: 90vw;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.modal-header-ims {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
    color: var(--ims-dark);
    border-bottom: 1px solid var(--ims-border);
}

.modal-header-ims i {
    font-size: 20px;
}

.modal-body-ims {
    padding: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ims-dark);
}

.modal-footer-ims {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 20px;
    border-top: 1px solid var(--ims-border);
    background: #fafafa;
}

.btn-modal-cancel {
    padding: 8px 20px;
    border: 1px solid var(--ims-border);
    background: white;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ims-dark);
    cursor: pointer;
}

.btn-modal-cancel:hover {
    background: #f0f0f0;
}

.btn-modal-confirm {
    padding: 8px 20px;
    border: none;
    background: var(--ims-olive);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    cursor: pointer;
}

.btn-modal-confirm:hover {
    background: var(--ims-olive-hover);
}

/* === DASHBOARD === */

.dash-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.dash-row > .dash-card {
    flex: 1;
    min-width: 0;
}

.dash-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 24px;
}

.dash-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 600;
    color: #4a4a4a;
}

.dash-view-all {
    font-size: 12px;
    font-weight: 600;
    color: var(--ims-olive);
    text-decoration: none;
    letter-spacing: 0.5px;
}

/* Score Ring */
.dash-score-card {
    text-align: center;
}

.dash-score-ring {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
}

.dash-score-ring svg {
    width: 100%;
    height: 100%;
}

.dash-score-ring circle {
    transition: stroke-dashoffset 0.8s ease;
}

.dash-score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.dash-score-percent {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #4a4a4a;
    line-height: 1;
}

.dash-score-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #999;
    letter-spacing: 1px;
    margin-top: 4px;
}

.dash-score-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.dash-stat-item {
    text-align: center;
}

.dash-stat-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
}

.dash-stat-label {
    font-size: 12px;
    color: #999;
}

/* Overview Grid */
.dash-overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.dash-overview-item {
    text-align: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.dash-overview-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #4a4a4a;
}

.dash-overview-label {
    font-size: 12px;
    color: #999;
}

/* Progress Bar */
.dash-progress-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    background: #eee;
}

.dash-progress-completed {
    background: var(--ims-olive);
    transition: width 0.5s ease;
}

.dash-progress-draft {
    background: #3b82c4;
    transition: width 0.5s ease;
}

.dash-progress-created {
    background: #ccc;
    transition: width 0.5s ease;
}

/* Bar Chart */
.dash-bar-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.dash-bar-label {
    width: 180px;
    font-size: 14px;
    color: #4a4a4a;
    flex-shrink: 0;
}

.dash-bar-track {
    flex: 1;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    margin: 0 12px;
    overflow: hidden;
}

.dash-bar-fill {
    height: 100%;
    background: var(--ims-olive);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.dash-bar-count {
    font-size: 14px;
    font-weight: 600;
    color: #4a4a4a;
    width: 30px;
    text-align: right;
    flex-shrink: 0;
}

/* Urgent Measures */
.dash-urgent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.15s;
    margin: 0 -24px;
    padding-left: 24px;
    padding-right: 24px;
}

.dash-urgent-item:hover {
    background: #f8f9fa;
}

.dash-urgent-item:last-child {
    border-bottom: none;
}

.dash-urgent-left {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.dash-urgent-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.dash-urgent-icon.overdue {
    background: #fde8e8;
    color: #d9534f;
}

.dash-urgent-icon.upcoming {
    background: #fef3e2;
    color: #e8a838;
}

.dash-urgent-title {
    font-size: 14px;
    font-weight: 600;
    color: #4a4a4a;
}

.dash-urgent-desc {
    font-size: 13px;
    color: #999;
    margin-top: 2px;
}

.dash-urgent-tags {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.dash-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 3px;
    letter-spacing: 0.3px;
    background: #f0f0f0;
    color: #666;
}

.dash-tag.critical {
    background: #fde8e8;
    color: #d9534f;
}

.dash-tag.medium {
    background: #fef3e2;
    color: #e8a838;
}

.dash-urgent-arrow {
    font-size: 24px;
    color: #ccc;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .dash-row {
        flex-direction: column;
    }
}
