/**
 * Prospektportal Frontend CSS
 */

/* =====================================================
   Company Switcher Menüeintrag
   ===================================================== */
.dp-company-switcher-item > a {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    color: inherit;
    font-weight: 500;
    transition: color 0.2s ease;
}

.dp-company-switcher-item > a:hover {
    color: #0073aa;
    text-decoration: none;
}

.dp-company-switcher-item .dp-switcher-icon {
    font-style: normal;
    font-size: 1.1em;
    line-height: 1;
    color: #0073aa;
    flex-shrink: 0;
}

/* Login Form */
.druckportal-login-container {
    max-width: 400px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.druckportal-login-header {
    text-align: center;
    margin-bottom: 25px;
}

.druckportal-login-header h2 {
    margin-top: 0;
    color: #333;
}

.druckportal-login-form-wrapper .login-username,
.druckportal-login-form-wrapper .login-password {
    margin-bottom: 15px;
}

.druckportal-login-form-wrapper label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.druckportal-login-form-wrapper input[type="text"],
.druckportal-login-form-wrapper input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.druckportal-login-form-wrapper .login-remember {
    margin-bottom: 20px;
}

.druckportal-login-form-wrapper .login-submit {
    text-align: center;
}

.druckportal-login-form-wrapper input[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: #23282d;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.druckportal-login-form-wrapper input[type="submit"]:hover {
    background-color: #005177;
}

.druckportal-login-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

.druckportal-notice {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.druckportal-notice-error {
    background-color: #fbeaea;
    border: 1px solid #dc3232;
    color: #dc3232;
}

.druckportal-notice-info {
    background-color: #e5f5fa;
    border: 1px solid #111111;
    color: #111111;
}

/* Dashboard */
.druckportal-dashboard {
    margin-bottom: 40px;
}

.druckportal-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.druckportal-dashboard-header h2 {
    margin: 0;
}

.druckportal-dashboard-actions .button {
    margin-left: 10px;
}

@media (max-width: 600px) {
    .druckportal-dashboard-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .druckportal-dashboard-actions .button {
        margin: 0 5px;
    }
}

/* ============================================================
   AUSSENDIENST / VERTRETER DASHBOARD
   ============================================================ */

.dp-sales-card-number {
    font-size: 11px;
    font-weight: 400;
    color: #a1a1aa;
    margin-left: 4px;
}

/* --- Kampagnenlisten: Zeilenstruktur --- */
.dp-camp-cust-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
}

.dp-camp-cust-info {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

/* --- (i) Info-Icon mit Tooltip --- */
.dp-info-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.dp-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e4e4e7;
    color: #52525b;
    font-size: 10px;
    font-weight: 700;
    font-style: normal;
    cursor: default;
    line-height: 1;
    transition: background .15s;
    flex-shrink: 0;
}

.dp-info-wrap:hover .dp-info-icon,
.dp-info-wrap:focus-within .dp-info-icon {
    background: #18181b;
    color: #fff;
}

.dp-info-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #18181b;
    color: #f4f4f5;
    font-size: 12px;
    line-height: 1.6;
    padding: 10px 13px;
    border-radius: 8px;
    white-space: nowrap;
    z-index: 9999;
    min-width: 160px;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    pointer-events: none;
}

.dp-info-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #18181b;
}

.dp-info-wrap:hover .dp-info-tooltip,
.dp-info-wrap:focus-within .dp-info-tooltip {
    display: block;
}

/* Telefon-Emoji im Tooltip farbig machen */
.dp-info-tooltip .dp-tooltip-phone {
    color: #fff;
}
.dp-info-tooltip .dp-tooltip-mail {
    color: #93c5fd;  /* helles Blau */
}

/* --- Kampagnenspalten-Suche --- */
.dp-camp-col-search {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.dp-camp-col-search-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #d4d4d8;
    border-radius: 6px;
    font-size: 12px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    background: #fafafa;
    color: #18181b;
}

.dp-camp-col-search-input:focus {
    border-color: #18181b;
    box-shadow: 0 0 0 2px rgba(24,24,27,.07);
    background: #fff;
}

.dp-camp-col-search-input::placeholder {
    color: #a1a1aa;
}

/* --- Bestell-Button (Zettel-Icon) --- */
.dp-order-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: #f4f4f5;
    color: #52525b;
    text-decoration: none;
    transition: background .15s, color .15s;
    flex-shrink: 0;
}

.dp-order-btn .dashicons {
    font-size: 15px;
    width: 15px;
    height: 15px;
}

.dp-order-btn:hover {
    background: #18181b;
    color: #fff;
    text-decoration: none;
}


.dp-sales-dashboard {
    max-width: 1100px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* --- Header --- */
.dp-sales-header {
    background: linear-gradient(135deg, #18181b 0%, #27272a 100%);
    color: #fff;
    border-radius: 16px;
    padding: 32px 36px;
    margin-bottom: 28px;
}

.dp-sales-header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}

.dp-sales-avatar {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dp-sales-avatar .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #a1a1aa;
}

.dp-sales-greeting {
    margin: 0 0 4px;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
}

.dp-sales-subtitle {
    margin: 0;
    color: #a1a1aa;
    font-size: 14px;
}

/* --- Notices --- */
.dp-sales-notice {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 16px 20px;
    color: #0369a1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    font-size: 14px;
}

.dp-sales-notice--warning {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
}

/* --- Tabs --- */
.dp-sales-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e4e4e7;
    margin-bottom: 28px;
}

.dp-sales-tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #71717a;
    transition: color .15s, border-color .15s;
}

.dp-sales-tab-btn:hover {
    color: #18181b;
}

.dp-sales-tab-btn.is-active {
    color: #18181b;
    border-bottom-color: #18181b;
}

.dp-sales-tab-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.dp-sales-tab-count {
    background: #e4e4e7;
    color: #52525b;
    border-radius: 99px;
    padding: 1px 8px;
    font-size: 12px;
    font-weight: 600;
}

.dp-sales-tab-btn.is-active .dp-sales-tab-count {
    background: #18181b;
    color: #fff;
}

.dp-sales-tab-content {
    display: none;
}

.dp-sales-tab-content.is-active {
    display: block;
}

/* --- Suche --- */
.dp-sales-search-bar {
    margin-bottom: 20px;
}

.dp-sales-search-input {
    width: 100%;
    max-width: 380px;
    padding: 10px 16px;
    border: 1px solid #d4d4d8;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.dp-sales-search-input:focus {
    border-color: #18181b;
    box-shadow: 0 0 0 3px rgba(24,24,27,.08);
}

/* --- Kundenkarten-Grid --- */
.dp-sales-customer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.dp-sales-customer-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e4e4e7;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, box-shadow .15s, transform .1s;
    position: relative;
    cursor: pointer;
}

.dp-sales-customer-card:hover {
    border-color: #18181b;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    transform: translateY(-2px);
    text-decoration: none;
}

.dp-sales-customer-card.is-inactive {
    opacity: .65;
}

.dp-sales-card-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, #18181b, #3f3f46);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.dp-sales-card-body {
    flex: 1;
    min-width: 0;
}

.dp-sales-card-name {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
    color: #18181b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dp-sales-card-city,
.dp-sales-card-contacts {
    margin: 0;
    font-size: 12px;
    color: #71717a;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dp-sales-card-city .dashicons,
.dp-sales-card-contacts .dashicons {
    font-size: 13px;
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.dp-sales-card-arrow {
    font-size: 22px;
    color: #d4d4d8;
    flex-shrink: 0;
    transition: color .15s;
}

.dp-sales-customer-card:hover .dp-sales-card-arrow {
    color: #18181b;
}

/* --- Badges --- */
.dp-sales-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .4px;
}

.dp-sales-badge--active {
    background: #dcfce7;
    color: #166534;
}

.dp-sales-badge--inactive {
    background: #fee2e2;
    color: #991b1b;
}

.dp-sales-card-badge {
    position: absolute;
    top: 10px;
    right: 38px;
}

/* --- Back-Button --- */
.dp-sales-back-bar {
    margin-bottom: 20px;
}

.dp-sales-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f4f4f5;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #18181b;
    text-decoration: none;
    transition: background .15s;
}

.dp-sales-back-btn:hover {
    background: #e4e4e7;
    text-decoration: none;
}

/* --- Detailansicht --- */
.dp-sales-customer-detail {}

.dp-sales-detail-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.dp-sales-detail-header h2 {
    margin: 0;
    font-size: 24px;
    color: #18181b;
}

.dp-sales-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 0;
}

/* --- Panel --- */
.dp-sales-panel {
    background: #fff;
    border: 1px solid #e4e4e7;
    border-radius: 12px;
    overflow: hidden;
}

.dp-sales-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: #fafafa;
    border-bottom: 1px solid #e4e4e7;
}

.dp-sales-panel-header .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #52525b;
}

.dp-sales-panel-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #18181b;
}

.dp-sales-panel-body {
    padding: 18px 20px;
    font-size: 14px;
    color: #3f3f46;
    line-height: 1.6;
}

.dp-sales-panel-body a {
    color: #2563eb;
}

.dp-sales-empty {
    color: #a1a1aa;
    font-style: italic;
    margin: 0;
}

/* --- Ansprechpartner-Liste --- */
.dp-sales-contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dp-sales-contact-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f4f4f5;
}

.dp-sales-contact-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dp-sales-contact-email,
.dp-sales-contact-phone {
    font-size: 12px;
    color: #71717a;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dp-sales-contact-email { color: #2563eb; }

.dp-sales-contact-phone .dashicons {
    font-size: 13px;
    width: 13px;
    height: 13px;
}

/* --- Bestellungstabelle --- */
.dp-sales-orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.dp-sales-orders-table th {
    text-align: left;
    padding: 8px 12px;
    background: #f4f4f5;
    color: #52525b;
    font-weight: 600;
    border-bottom: 1px solid #e4e4e7;
}

.dp-sales-orders-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f4f4f5;
    color: #3f3f46;
}

.dp-sales-orders-table tr:last-child td {
    border-bottom: none;
}

.dp-sales-order-status {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
}

.dp-sales-order-status--pending    { background: #fef3c7; color: #92400e; }
.dp-sales-order-status--processing { background: #dbeafe; color: #1d4ed8; }
.dp-sales-order-status--completed  { background: #dcfce7; color: #166534; }
.dp-sales-order-status--cancelled  { background: #fee2e2; color: #991b1b; }

/* --- Kampagnen-Auswertung --- */
.dp-sales-campaign-block {
    background: #fff;
    border: 1px solid #e4e4e7;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 20px;
}

.dp-sales-campaign-header {
    padding: 18px 22px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.dp-sales-campaign-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.dp-sales-campaign-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #18181b;
}

/* Deadline-Badge */
.dp-sales-deadline-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
}

.dp-sales-deadline-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.dp-sales-deadline--ok      { background: #dcfce7; color: #166534; }
.dp-sales-deadline--warning { background: #fef9c3; color: #854d0e; }
.dp-sales-deadline--urgent  { background: #fee2e2; color: #991b1b; }

/* Fortschrittsbalken */
.dp-sales-progress-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dp-sales-progress-bar {
    flex: 1;
    height: 8px;
    background: #e4e4e7;
    border-radius: 99px;
    overflow: hidden;
}

.dp-sales-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 99px;
    transition: width .4s ease;
}

.dp-sales-progress-label {
    font-size: 12px;
    color: #71717a;
    white-space: nowrap;
    flex-shrink: 0;
}

.dp-sales-campaign-body {
    padding: 20px 22px;
}

.dp-sales-campaign-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.dp-sales-campaign-col h4 {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: #3f3f46;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dp-sales-campaign-col h4 .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.dp-sales-campaign-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dp-sales-cust-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background .12s;
}

.dp-sales-cust-link--ordered {
    color: #166534;
    background: #f0fdf4;
}

.dp-sales-cust-link--ordered:hover {
    background: #dcfce7;
}

.dp-sales-cust-link--missing {
    color: #18181b;
    background: #fafafa;
}

.dp-sales-cust-link--missing:hover {
    background: #f4f4f5;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .dp-sales-header { padding: 20px 18px; }
    .dp-sales-greeting { font-size: 20px; }
    .dp-sales-customer-grid { grid-template-columns: 1fr; }
    .dp-sales-detail-grid { grid-template-columns: 1fr; }
    .dp-sales-campaign-cols { grid-template-columns: 1fr; }
    .dp-sales-campaign-title-row { flex-direction: column; align-items: flex-start; }
    .dp-sales-progress-wrap { flex-direction: column; align-items: flex-start; }
    .dp-sales-progress-bar { width: 100%; }
    .dp-sales-tabs { gap: 0; }
    .dp-sales-tab-btn { padding: 10px 14px; font-size: 13px; }
}
