/* =============================================
   ciljStyle.css — Nov cilj form
   Design sistem usklajen s trackerStyle.css
   ============================================= */

* { box-sizing: border-box; }

body {
    background:
        radial-gradient(circle at top left, rgba(99, 102, 241, 0.08), transparent 35%),
        linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    min-height: 100vh;
}

.cilj-shell {
    width: min(520px, 100%);
    margin: 0 auto;
    padding: 32px 20px 80px;
}

/* ─── HEADER ─── */

.cilj-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.cilj-back {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 14px rgba(15,23,42,0.07);
    display: grid;
    place-items: center;
    font-size: 22px;
    color: #111827;
    text-decoration: none;
    flex: 0 0 auto;
    transition: 0.18s ease;
}

.cilj-back:hover {
    transform: translateX(-2px);
    box-shadow: 0 6px 18px rgba(15,23,42,0.11);
    color: #111827;
}

.cilj-header h1 {
    font-size: 28px;
    font-weight: 900;
    margin: 0;
    color: #0f172a;
}

.cilj-header p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 14px;
}

/* ─── STEPS ─── */

.cilj-step {
    animation: stepIn 0.25s ease;
}

.cilj-step.hidden {
    display: none;
}

@keyframes stepIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.step-label {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    margin-bottom: 20px;
}

/* ─── TIP GRID ─── */

.tip-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 28px;
}

.tip-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 18px 14px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(15,23,42,0.06);
}

.tip-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(15,23,42,0.1);
    border-color: #c7d2fe;
}

.tip-card.selected {
    border-color: #6d5dfc;
    background: linear-gradient(135deg, rgba(109,93,252,0.06), rgba(79,70,229,0.04));
    box-shadow: 0 0 0 4px rgba(109,93,252,0.12), 0 14px 34px rgba(109,93,252,0.12);
}

.tip-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 24px;
    box-shadow: 0 8px 20px rgba(15,23,42,0.12);
}

.tip-card strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}

.tip-card span {
    display: block;
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

/* ─── NEXT BUTTON ─── */

.cilj-next-btn {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #6d5dfc, #4f46e5);
    color: white;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(79,70,229,0.28);
    transition: 0.2s ease;
}

.cilj-next-btn:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(79,70,229,0.34);
}

.cilj-next-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ─── STEP 2 ─── */

.selected-tip-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 26px;
}

.tip-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}

.tip-badge-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 18px;
}

.change-tip-btn {
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #6d5dfc;
    cursor: pointer;
    transition: 0.18s ease;
}

.change-tip-btn:hover {
    background: #f5f3ff;
    border-color: #c4b5fd;
}

/* ─── FORM FIELDS ─── */

.cilj-field {
    margin-bottom: 20px;
}

.cilj-field label {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}

.cilj-field input[type="text"],
.cilj-field input[type="number"],
.cilj-field input[type="date"] {
    width: 100%;
    height: 48px;
    border: 1.5px solid #dbe3ee;
    border-radius: 14px;
    padding: 0 16px;
    font-size: 15px;
    color: #0f172a;
    background: #ffffff;
    transition: 0.18s ease;
    outline: none;
}

.cilj-field input:focus {
    border-color: #6d5dfc;
    box-shadow: 0 0 0 4px rgba(109,93,252,0.1);
}

.cilj-field input::placeholder {
    color: #94a3b8;
}

.cilj-field small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #94a3b8;
}

.input-with-unit {
    position: relative;
}

.input-with-unit input {
    padding-right: 52px;
}

.input-with-unit span {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 800;
    color: #64748b;
    pointer-events: none;
}

.optional {
    font-weight: 500;
    color: #94a3b8;
}

.required {
    color: #ef4444;
}

/* ─── FIELD GROUPS ─── */

.cilj-field-group {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(15,23,42,0.06);
}

.cilj-field-group .cilj-field:last-child {
    margin-bottom: 0;
}

/* ─── TRAJANJE PREVIEW ─── */

.trajanje-preview {
    background: linear-gradient(135deg, #ede9fe, #f5f3ff);
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: -4px;
    font-size: 14px;
    font-weight: 700;
    color: #5b21b6;
    text-align: center;
}

/* ─── ERROR ─── */

.cilj-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 16px;
}

/* ─── SUBMIT ─── */

.cilj-submit-btn {
    width: 100%;
    height: 54px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #6d5dfc, #4f46e5);
    color: white;
    font-size: 17px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(79,70,229,0.28);
    transition: 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cilj-submit-btn:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(79,70,229,0.34);
}

.cilj-submit-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ─── RESPONSIVE ─── */

@media (max-width: 480px) {
    .tip-grid {
        grid-template-columns: 1fr;
    }

    .cilj-shell {
        padding: 20px 14px 60px;
    }
}