/* Tracking Dashboard Styles */

.tracking-container {
    padding: 40px 0;
}

.dashboard-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.summary-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 4px solid var(--primary-blue);
}

.summary-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.summary-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.tracking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.tracking-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.tracking-card:hover {
    transform: translateY(-5px);
}

.card-status-bar {
    height: 6px;
    background: #eee;
    width: 100%;
}

.status-active {
    background: #2ecc71;
}

.status-pending {
    background: #f1c40f;
}

.status-closed {
    background: #95a5a6;
}

.card-content {
    padding: 20px;
    flex-grow: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.stage-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-notice {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-bid_result {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-contract {
    background: #f3e5f5;
    color: #7b1fa2;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-info {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.info-row {
    display: flex;
    margin-bottom: 6px;
}

.info-label {
    width: 70px;
    flex-shrink: 0;
}

.info-value {
    color: #34495e;
    font-weight: 500;
}

.card-memo {
    margin-top: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #555;
    border-left: 3px solid #ddd;
}

.card-footer {
    padding: 16px 20px;
    background: #fcfcfc;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-settings {
    background: none;
    border: 1px solid #ddd;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-settings:hover {
    background: #f0f0f0;
    border-color: #bbb;
}

.btn-view-orig {
    color: var(--primary-blue);
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 600;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 24px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: modalSlideDown 0.3s ease-out;
}

@keyframes modalSlideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.modal-body {
    margin-top: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group textarea,
.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.modal-footer {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-save {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.btn-cancel {
    background: #f1f1f1;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 40px;
}

.keyword-tag {
    background: #f8f9fa;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #d1d5da;
    color: #24292e;
}

.btn-del-kw {
    background: none;
    border: none;
    color: #d73a49;
    cursor: pointer;
    font-weight: bold;
    padding: 0 2px;
    font-size: 1.1rem;
    line-height: 1;
}

.btn-del-kw:hover {
    color: #cb2431;
}

/* Lifecycle Stepper Styles */
.lifecycle-stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 24px 0;
    padding: 0 10px;
    position: relative;
}

.lifecycle-stepper::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #95a5a6;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.step-label {
    font-size: 0.7rem;
    color: #95a5a6;
    font-weight: 600;
    text-align: center;
}

/* Active State */
.step.active .step-circle {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.2);
}

.step.active .step-label {
    color: var(--primary-blue);
    font-weight: 700;
}

/* Completed State */
.step.completed .step-circle {
    border-color: #2ecc71;
    background: #2ecc71;
    color: white;
}

.step.completed .step-label {
    color: #2ecc71;
}

.lifecycle-stepper::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 40px;
    height: 2px;
    background: var(--primary-blue);
    z-index: 1;
    width: 0;
    transition: width 0.5s ease-in-out;
}

/* Connect completed steps with blue line */
.lifecycle-stepper.stage-plan::after {
    width: 0%;
}

.lifecycle-stepper.stage-pre_notice::after {
    width: 25%;
}

.lifecycle-stepper.stage-notice::after {
    width: 50%;
}

.lifecycle-stepper.stage-bid_result::after {
    width: 75%;
}

.lifecycle-stepper.stage-contract::after {
    width: 100%;
}