/*
 * Farbpalette basierend auf Entlastungsdienst Logo:
 * Primary: #C96B7E (Rot aus Logo - heller)
 * Success: #28a745 (Grün für erfüllte Kompetenzen)
 * Warning: #ffa500 (Orange für in Arbeit)
 * Neutral: #6c757d (Grau)
 * Background: #f8f9fa (Hellgrau)
 * Light Pink: #fce8eb (Hintergrund für Info-Boxen)
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

/* User Toggle Buttons */
.user-toggle {
    display: none; /* Hidden - functionality moved to sidebar */
    position: fixed;
    top: 50%;
    right: calc(50% - 375px/2 - 120px);
    transform: translateY(-50%);
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

/* Mobile devices - remove phone frame */
@media (max-width: 768px) {
    .user-toggle {
        right: 10px;
    }

    .phone-frame {
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        height: auto !important;
        min-height: 100vh !important;
    }
}

.user-toggle-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid #C96B7E;
    border-radius: 8px;
    color: #C96B7E;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 100px;
}

.user-toggle-btn:hover {
    background: #C96B7E;
    color: white;
}

.user-toggle-btn.active {
    background: #C96B7E;
    color: white;
}

.phone-frame {
    max-width: 375px;
    margin: 20px auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
    height: 812px;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Header */
.header {
    background: #C96B7E;
    color: white;
    padding: 35px 15px 15px 15px;  /* change for adjusted padding in header */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 18px;
    font-weight: 600;
}

.menu-icon {
    font-size: 24px;
    cursor: pointer;
}

.lang-selector {
    font-size: 14px;
    cursor: pointer;
}

/* Content Area */
.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* Login Screen */
.logo {
    text-align: center;
    margin: 40px 0;
}

.logo h1 {
    font-size: 28px;
    color: #C96B7E;
    margin-bottom: 10px;
}

.logo img {
    max-width: 200px;
    height: auto;
    margin-bottom: 20px;
}

.logo p {
    color: #6c757d;
    font-size: 14px;
}

.form-group {
    margin: 20px 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #6c757d;
}

select, input, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.btn {
    width: 100%;
    padding: 14px;
    background: #C96B7E;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    min-height: 44px;
}

.btn:active {
    background: #B35968;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:active {
    background: #5a6268;
}

/* Dashboard Cards */
.card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    min-height: 44px;
}

.card:active {
    background: #f8f9fa;
}

.card-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.card-action {
    color: #C96B7E;
    font-size: 14px;
}

/* Chat Interface */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: #f8f9fa;
}

.message {
    margin-bottom: 20px;
}

.message-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    margin-bottom: 5px;
}

.message.coach .message-bubble {
    background: #e9ecef;
    color: #333;
    float: left;
    clear: both;
    border-bottom-left-radius: 4px;
}

.message.user .message-bubble {
    background: #C96B7E;
    color: white;
    float: right;
    clear: both;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 11px;
    color: #6c757d;
    clear: both;
    display: block;
    padding: 0 5px;
}

.message.coach .message-time {
    text-align: left;
}

.message.user .message-time {
    text-align: right;
}

.feedback-buttons {
    clear: both;
    margin-top: 5px;
    padding-left: 5px;
}

.feedback-buttons button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px 10px;
    opacity: 0.6;
}

.feedback-buttons button:active {
    opacity: 1;
}

.chat-input {
    display: flex;
    padding: 10px;
    background: white;
    border-top: 1px solid #ddd;
}

.chat-input input {
    flex: 1;
    margin-right: 10px;
}

.send-btn {
    width: 44px;
    min-width: 44px;
    padding: 10px;
    background: #C96B7E;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
}

/* Competency Results */
.competency-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.competency-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.competency-name {
    font-weight: 600;
    font-size: 16px;
}

.competency-status {
    font-size: 24px;
}

.progress-bar {
    background: #e0e0e0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    background: #28a745;
    height: 100%;
    transition: width 0.3s;
}

.progress-fill.warning {
    background: #ffa500;
}

.progress-text {
    font-size: 14px;
    color: #6c757d;
}

/* Info Box */
.info-box {
    background: #fce8eb;
    border-left: 4px solid #C96B7E;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.info-box h3 {
    margin-bottom: 10px;
    font-size: 16px;
}

.info-box ul {
    margin-left: 20px;
}

.info-box li {
    margin: 5px 0;
    font-size: 14px;
}

/* Certificate */
.certificate {
    border: 3px solid #C96B7E;
    padding: 30px;
    margin: 20px 0;
    text-align: center;
    border-radius: 8px;
    background: white;
}

.certificate h2 {
    font-size: 24px;
    margin: 20px 0;
    color: #C96B7E;
}

.certificate .name {
    font-size: 20px;
    margin: 20px 0;
    font-weight: 600;
}

.certificate .date {
    color: #6c757d;
    margin-top: 20px;
}

/* Admin View */
.search-box {
    margin-bottom: 15px;
}

.filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-tab {
    padding: 8px 16px;
    background: #e9ecef;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
}

.filter-tab.active {
    background: #C96B7E;
    color: white;
}

.person-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.person-header {
    font-weight: 600;
    margin-bottom: 5px;
}

.person-email {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 15px;
}

.competency-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-bottom: 15px;
}

.competency-grid-item {
    font-size: 14px;
}

.person-status {
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
    font-weight: 600;
}

/* Welcome Message */
.welcome {
    margin-bottom: 30px;
}

.welcome h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.welcome p {
    color: #6c757d;
}

/* Learning Path */
.path-item {
    position: relative;
    margin-bottom: 15px;
}

/* Utility Classes */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Icon Filters */
.icon-white {
    filter: brightness(0) invert(1);
}

/* Icon Size Constraints - Local icons displayed at appropriate sizes */
img[src*="-48.png"] {
    width: 18px;
    height: 18px;
}

img[src*="-72.png"] {
    width: 24px;
    height: 24px;
}

img[src*="-96.png"] {
    width: 32px;
    height: 32px;
}

/* Card icon sizing */
.card-icon-img {
    width: 32px;
    height: 32px;
}

/* Sidebar user info styles matching real app */
.sidebar-user-label {
    font-size: 11px;
    color: #999;
    margin-bottom: 2px;
}

/* Sidebar Menu */
.sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    border-radius: 20px;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: absolute;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: white;
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    border-radius: 20px 0 0 20px;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    background: #C96B7E;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.sidebar-close {
    font-size: 28px;
    cursor: pointer;
    background: none;
    border: none;
    color: white;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    transition: background 0.2s ease;
}

.sidebar-menu li:hover {
    background: #f8f9fa;
}

.sidebar-menu a:hover {
    background: #f8f9fa;
}

.sidebar-menu a img {
    width: 24px;
    height: 24px;
}

.sidebar-menu .logout-link {
    color: #dc3545;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #C96B7E;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
}

.sidebar-user-info {
    flex: 1;
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 14px;
}

.sidebar-user-email {
    font-size: 12px;
    color: #6c757d;
}

.sidebar-menu-item-wrapper {
    display: flex;
    flex-direction: column;
}

.sidebar-menu-disclaimer {
    font-size: 11px;
    color: #6c757d;
    padding: 0 20px 12px 59px;
    line-height: 1.3;
}
