*{box-sizing:border-box}body{margin:0;background:#f6f6f7;color:#111;font-family:Arial,Helvetica,sans-serif}a{color:#111}.muted{color:#777}.app-shell{min-height:100vh;display:flex}.sidebar{width:260px;background:#111;color:#fff;padding:22px;display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0}.brand{display:flex;gap:12px;align-items:center;margin-bottom:36px}.brand-mark{width:42px;height:42px;background:#fff;color:#111;border-radius:12px;display:grid;place-items:center;font-weight:800}.brand span{display:block;color:#bbb;font-size:13px;margin-top:2px}.nav{display:grid;gap:8px}.nav a,.sidebar-footer a{color:#ddd;text-decoration:none;padding:12px 14px;border-radius:10px}.nav a:hover,.nav a.active,.sidebar-footer a:hover{background:#252525;color:#fff}.sidebar-footer{margin-top:auto}.main{flex:1;margin-left:260px}.topbar{height:70px;background:#fff;border-bottom:1px solid #e7e7e7;display:flex;justify-content:space-between;align-items:center;padding:0 28px}.content{padding:28px}.page-header{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:24px}.page-header h1{margin:0 0 6px}.page-header p{margin:0;color:#666}.card{background:#fff;border:1px solid #e8e8e8;border-radius:14px;padding:22px;margin-bottom:22px}.card h2{margin-top:0}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:22px}.stat-card{background:#fff;border:1px solid #e8e8e8;border-radius:14px;padding:20px}.stat-card span{display:block;color:#666;margin-bottom:8px}.stat-card strong{font-size:34px}.table{width:100%;border-collapse:collapse}.table th,.table td{text-align:left;border-bottom:1px solid #eee;padding:12px;vertical-align:middle}.button{display:inline-block;padding:10px 16px;background:#111;color:#fff;border-radius:10px;text-decoration:none;border:0;cursor:pointer;font-weight:700}.button.secondary{background:#f1f1f1;color:#111}.button.full{width:100%}.button.small{padding:7px 10px;font-size:13px}.form label{display:block;margin:16px 0 6px;font-weight:600}.form input,.form textarea,.form select{width:100%;padding:11px;border:1px solid #ddd;border-radius:8px;background:#fff}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.alert{padding:12px;border-radius:10px;margin-bottom:16px}.alert-error{background:#fff0f0;border:1px solid #ffcccc;color:#9b0000}.alert-success{background:#effaf2;border:1px solid #bdeac8;color:#126b2e}.progress,.mini-progress{background:#eee;border-radius:99px;overflow:hidden}.progress{height:12px;margin:10px 0 18px}.mini-progress{height:8px;width:130px;display:inline-block;margin-right:8px}.progress div,.mini-progress div{height:100%;background:#111}.module-links{display:grid;gap:10px}.module-links a{padding:12px;background:#f7f7f7;border-radius:10px;color:#111;text-decoration:none}.activity-list{padding-left:20px}.activity-list li{margin-bottom:14px}.login-page{min-height:100vh;display:grid;place-items:center;padding:20px}.login-card{width:100%;max-width:420px;background:#fff;border:1px solid #e8e8e8;border-radius:18px;padding:30px}.login-logo{width:54px;height:54px;background:#111;color:#fff;display:grid;place-items:center;border-radius:14px;font-weight:800;margin-bottom:20px}.checkbox-list{display:grid;gap:10px;margin:12px 0 20px}.checkbox-list label,.inline-check{display:flex!important;align-items:center;gap:10px;font-weight:400!important;margin:8px 0!important}.checkbox-list input,.inline-check input{width:auto!important}.badge{display:inline-block;padding:5px 9px;border-radius:99px;font-size:12px;background:#eee}.badge-active{background:#e8f7ed;color:#126b2e}.badge-inactive{background:#f1f1f1;color:#555}.badge-invited{background:#fff7df;color:#7a5600}.credential-box{background:#f7f7f7;border:1px dashed #bbb;border-radius:12px;padding:16px}code{background:#111;color:#fff;padding:4px 7px;border-radius:6px}@media(max-width:900px){.sidebar{position:static;width:100%}.app-shell{display:block}.main{margin-left:0}.stats-grid,.grid,.form-grid,.page-header{display:block}.stat-card{margin-bottom:12px}.topbar{height:auto;padding:18px;display:block}.content{padding:18px}.table{display:block;overflow-x:auto;white-space:nowrap}}

/* v1.3 files module */
input[type="file"] { background: #fff; }


/* v1.4 messages module */
.message-list {
    display: grid;
    gap: 14px;
}

.message-card {
    background: #fafafa;
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 16px;
}

.message-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: #666;
    font-size: 13px;
    margin-bottom: 10px;
}

.message-meta strong {
    color: #111;
    font-size: 14px;
}

.message-meta span:not(:last-child)::after {
    content: "";
}

.message-body {
    white-space: normal;
    line-height: 1.5;
}

/* v1.5 approvals module */
.approval-list { display: grid; gap: 16px; }
.approval-card { background: #fafafa; border: 1px solid #ececec; border-radius: 12px; padding: 16px; }
.approval-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.approval-header h3 { margin: 0 0 6px; }
.approval-description { background: #fff; border: 1px solid #eee; border-radius: 10px; padding: 14px; margin: 14px 0; line-height: 1.5; }
.approval-actions { margin-top: 14px; }
.approval-actions textarea { margin-bottom: 10px; }
.badge-pending { background: #fff7df; color: #7a5600; }
.badge-approved { background: #e8f7ed; color: #126b2e; }
.badge-changes_requested { background: #fff0f0; color: #9b0000; }
@media (max-width: 900px) { .approval-header { display: block; } }

/* v1.6 notifications module */
.notification-list { display: grid; gap: 12px; }
.notification-card { display: flex; justify-content: space-between; gap: 16px; background: #fafafa; border: 1px solid #ececec; border-radius: 12px; padding: 16px; }
.notification-card.is-unread { background: #fff; border-color: #111; }
.notification-header { display: flex; align-items: center; gap: 10px; }
.notification-content p { margin-bottom: 8px; }
.notification-actions { display: flex; gap: 8px; align-items: flex-start; }
.unread-dot, .nav-badge { display: inline-block; background: #111; color: #fff; border-radius: 999px; font-size: 11px; padding: 3px 7px; }
.nav-badge { margin-left: 6px; background: #fff; color: #111; }
@media (max-width: 900px) {
    .notification-card, .notification-actions { display: block; }
    .notification-actions .button { margin-top: 8px; }
}

/* v1.7 project edit */
.button-row { display: flex; gap: 10px; align-items: center; }
@media (max-width: 900px) {
    .button-row { display: block; }
    .button-row .button { margin-bottom: 8px; }
}


/* v1.8 Phase 1 branding */
.brand-logo {
    width: 168px;
    max-width: 100%;
    height: auto;
    filter: invert(1);
}

.login-brand-image {
    width: 190px;
    max-width: 100%;
    display: block;
    margin-bottom: 24px;
}

.login-logo {
    display: none;
}

.topbar {
    backdrop-filter: blur(10px);
}

.card,
.stat-card,
.login-card {
    box-shadow: 0 10px 30px rgba(17, 17, 17, 0.04);
}

.phase-note {
    background: #fff;
    border: 1px dashed #ccc;
    border-radius: 12px;
    padding: 14px;
    color: #555;
}


/* v1.9 Phase 2 client workspace */
.profile-notes {
    background: #fafafa;
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 14px;
    margin-top: 18px;
}

.profile-notes p {
    margin-bottom: 0;
    line-height: 1.5;
}


/* v2.0 Phase 3 milestones */
.milestone-timeline {
    position: relative;
    display: grid;
    gap: 18px;
}

.milestone-item {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 14px;
    position: relative;
}

.milestone-item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 24px;
    bottom: -20px;
    width: 2px;
    background: #e6e6e6;
}

.milestone-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ddd;
    border: 4px solid #fff;
    box-shadow: 0 0 0 1px #ddd;
    margin-top: 3px;
    z-index: 1;
}

.milestone-completed .milestone-dot {
    background: #126b2e;
    box-shadow: 0 0 0 1px #126b2e;
}

.milestone-in_progress .milestone-dot {
    background: #111;
    box-shadow: 0 0 0 1px #111;
}

.milestone-waiting_client .milestone-dot {
    background: #c98a00;
    box-shadow: 0 0 0 1px #c98a00;
}

.milestone-content {
    background: #fafafa;
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 14px;
}

.milestone-title-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.milestone-title-row h3 {
    margin: 0 0 8px;
}

.badge-not_started {
    background: #f1f1f1;
    color: #555;
}

.badge-in_progress {
    background: #111;
    color: #fff;
}

.badge-waiting_client {
    background: #fff7df;
    color: #7a5600;
}

.badge-completed {
    background: #e8f7ed;
    color: #126b2e;
}

.badge-skipped {
    background: #eee;
    color: #777;
}

/* v2.1 ClickUp integration */
.connection-result { margin-top: 18px; border-radius: 12px; padding: 14px; }
.connection-success { background: #effaf2; border: 1px solid #bdeac8; color: #126b2e; }
.connection-error { background: #fff0f0; border: 1px solid #ffcccc; color: #9b0000; }
.code-like { background: #111; color: #fff; border-radius: 10px; padding: 12px 14px; font-family: monospace; display: inline-block; }

/* v0.9 workspace UI refactor */
.workspace-tabs, .project-tabs { display: flex; flex-wrap: wrap; gap: 8px; background: #fff; border: 1px solid #e8e8e8; border-radius: 14px; padding: 8px; margin-bottom: 22px; }
.workspace-tabs a, .project-tabs a { text-decoration: none; padding: 9px 12px; border-radius: 10px; color: #333; }
.workspace-tabs a.active, .project-tabs a.active, .workspace-tabs a:hover, .project-tabs a:hover { background: #111; color: #fff; }
.client-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.client-card { display: block; background: #fff; border: 1px solid #e8e8e8; border-radius: 14px; padding: 22px; text-decoration: none; color: #111; }
.client-card:hover, .project-mini-card:hover, .compact-item:hover { border-color: #111; }
.client-card h2 { margin-top: 0; }
.client-card-stats { display: flex; gap: 10px; color: #666; margin-bottom: 10px; }
.project-card-list, .compact-list { display: grid; gap: 10px; }
.project-mini-card, .compact-item { display: block; background: #fafafa; border: 1px solid #ececec; border-radius: 12px; padding: 13px; text-decoration: none; color: #111; }
.project-mini-card span, .compact-item span { display: block; color: #666; margin-top: 4px; font-size: 13px; }
.stat-text { font-size: 20px !important; }
.waiting-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.waiting-item { background: #fafafa; border: 1px solid #ececec; border-radius: 12px; padding: 13px; margin-bottom: 10px; }
.waiting-item span { display: block; color: #666; margin: 4px 0 8px; font-size: 13px; }
.waiting-item.is-done { opacity: 0.6; }
.waiting-item.is-done strong { text-decoration: line-through; }
@media (max-width: 900px) { .client-grid, .waiting-columns { display: block; } .client-card { margin-bottom: 12px; } }

/* v2.2 ClickUp selectors */
.clickup-picker-form { border-bottom: 1px solid #eee; padding-bottom: 18px; margin-bottom: 18px; }
button:disabled, select:disabled { opacity: 0.55; cursor: not-allowed; }

/* v3.3 dashboard polish */
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.form-section { border: 1px solid #ececec; border-radius: 14px; padding: 16px; margin-top: 18px; background: #fafafa; }
.form-section h2 { margin-top: 0; }

/* v3.4 messaging */
.chat-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr); gap: 18px; align-items: start; }
.chat-thread-card { min-height: 420px; }
.chat-thread { display: grid; gap: 14px; }
.chat-bubble { background: #fafafa; border: 1px solid #ececec; border-radius: 14px; padding: 14px; max-width: 850px; }
.chat-bubble.is-mine { background: #111; color: #fff; margin-left: auto; }
.chat-bubble.is-mine .message-meta, .chat-bubble.is-mine .message-meta span { color: rgba(255,255,255,0.75); }
.chat-bubble .message-body { line-height: 1.55; }
@media (max-width: 900px) { .chat-layout { display: block; } .chat-layout > .card { margin-bottom: 16px; } }

/* v3.5 ClickUp tasks */
.table small { color: #777; }
