/* ── Page wrapper ── */
.ic-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}
.ic-page-sm {
    max-width: 560px;
    margin: 60px auto;
    padding: 0 20px 60px;
}

/* ── Hero ── */
.ic-hero { text-align: center; margin-bottom: 32px; }
.ic-hero h1 { font-size: 24px; font-weight: 700; color: #1e1b4b; margin-bottom: 6px; }
.ic-hero p  { color: #6b7280; font-size: 14px; }

/* ── Layout ── */
.ic-layout {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}
.ic-sidebar {
    width: 255px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ic-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── Card ── */
.ic-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
/* status page card gets accent bar + larger padding */
.ic-card-status {
    border-radius: 16px;
    padding: 48px 36px;
    box-shadow: 0 4px 24px rgba(99,102,241,.08);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.ic-card-status::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #a78bfa);
    border-radius: 16px 16px 0 0;
}

.ic-card-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f3f4f6;
}

/* ── Upload area ── */
.ic-upload-area {
    border: 2px dashed #e0e0fb;
    border-radius: 10px;
    padding: 28px 12px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    position: relative;
    background: #fafafe;
}
.ic-upload-area:hover { border-color: #6366f1; background: #f5f3ff; }
.ic-upload-area input {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%;
}
.ic-upload-area .ic-up-icon {
    font-size: 28px;
    color: #a5b4fc;
    margin-bottom: 8px;
    display: block;
}
.ic-upload-area strong { font-size: 13px; display: block; color: #374151; }
.ic-upload-area p { font-size: 11px; color: #9ca3af; margin-top: 4px; }

.ic-file-info {
    font-size: 11px;
    color: #6b7280;
    margin-top: 10px;
    padding: 7px 10px;
    background: #f9fafb;
    border-radius: 6px;
    display: none;
    word-break: break-all;
    line-height: 1.5;
}
.ic-file-info.visible { display: block; }

/* ── Form fields ── */
.ic-field { margin-bottom: 10px; }
.ic-field:last-child { margin-bottom: 0; }

label.ic-label {
    display: block;
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 4px;
}

.ic-input, .ic-select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    font-size: 13px;
    font-family: inherit;
    background: #fff;
    color: #374151;
    transition: border-color .15s, box-shadow .15s;
}
.ic-input:focus, .ic-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.ic-input[readonly] { background: #f9fafb; color: #adb5bd; cursor: default; }

/* ── Lock row ── */
.ic-lock-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #374151;
    cursor: pointer;
    user-select: none;
    margin-bottom: 10px;
    padding: 8px 10px;
    border: 1px solid #e9ecef;
    border-radius: 7px;
    transition: border-color .15s;
}
.ic-lock-row:hover { border-color: #6366f1; }
.ic-lock-row input { width: auto; accent-color: #6366f1; }

/* ── Divider ── */
.ic-divider { height: 1px; background: #f3f4f6; margin: 12px 0; }

/* ── Crop info text ── */
.ic-crop-info { font-size: 11px; color: #9ca3af; margin-top: 8px; text-align: center; }

/* ── Buttons ── */
.ic-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    font-family: inherit;
    transition: all .15s;
    margin-bottom: 6px;
    text-decoration: none;
}
.ic-btn:last-child { margin-bottom: 0; }
.ic-btn:hover { text-decoration: none; }

.ic-btn-primary { background: #6366f1; color: #fff; }
.ic-btn-primary:hover { background: #4f46e5; color: #fff; }
.ic-btn-gray { background: #f3f4f6; color: #374151; border-color: #e5e7eb; margin-bottom:6px!important;}
.ic-btn-gray:hover { background: #e9ecef; color: #374151; }
.ic-btn-red { background: #fff0f0; color: #dc2626; border-color: #fca5a5; }
.ic-btn-red:hover { background: #fee2e2; color: #dc2626; }
.ic-btn-sm { width: auto; padding: 6px 12px; font-size: 12px; margin-bottom: 0; }
.ic-btn-row { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.ic-btn:disabled { opacity: .6; cursor: not-allowed; }
.ic-crop-result-actions .ic-btn{
    margin-bottom: 6px !important;
}
/* ── Cropper canvas ── */
#cropperWrap { display: none; }
#preview { display: block; max-width: 100%; }

/* ── Canvas placeholder ── */
.ic-canvas-placeholder {
    height: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #d1d5db;
    border: 2px dashed #e9ecef;
    border-radius: 10px;
}
.ic-canvas-placeholder .ph-icon { font-size: 40px; color: #d1d5db; }
.ic-canvas-placeholder p { font-size: 13px; color: #d1d5db; }

/* ── Gallery ── */
.ic-gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.ic-gallery-header strong { font-size: 14px; color: #1e1b4b; }
.ic-gallery-actions { display: flex; gap: 6px; }

.crops { display: flex; flex-wrap: wrap; gap: 10px; }

.crop-item {
    position: relative;
    border: 1px solid #e9ecef;
    border-radius: 9px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
    background: #fff;
}
.crop-item:hover {
    border-color: #6366f1;
    box-shadow: 0 2px 10px rgba(99,102,241,.15);
}
.crop-item img { height: 110px; display: block; }
.crop-item .dims {
    padding: 4px 8px;
    font-size: 10px;
    color: #6b7280;
    text-align: center;
    background: #f9fafb;
    border-top: 1px solid #f3f4f6;
}
.crop-item .del {
    position: absolute;
    top: 5px; right: 5px;
    background: rgba(0,0,0,.55);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 22px; height: 22px;
    font-size: 10px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity .15s;
}
.crop-item:hover .del { opacity: 1; }

.ic-empty {
    color: #9ca3af;
    font-size: 13px;
    text-align: center;
    padding: 28px 20px;
    width: 100%;
    border: 1px dashed #e9ecef;
    border-radius: 8px;
}

/* ── Preview modal ── */
.ic-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0,0,0,.65);
    justify-content: center;
    align-items: center;
}
.ic-modal-box {
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.ic-modal-box img { max-width: 100%; max-height: 65vh; border-radius: 8px; }
.ic-modal-close {
    position: absolute;
    top: 10px; right: 12px;
    background: #ef4444;
    color: #fff;
    border: none;
    font-size: 13px;
    width: 26px; height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.ic-modal-dims { margin-top: 10px; font-size: 12px; color: #6b7280; }

/* ═══════════════════════════════════════════
   STATUS PAGE SPECIFICS
═══════════════════════════════════════════ */
.ic-status-title { font-size: 20px; font-weight: 700; color: #1e1b4b; margin-bottom: 6px; }
.ic-status-sub   { font-size: 13px; color: #9ca3af; margin-bottom: 24px; line-height: 1.6; }

/* Spinner */
.ic-spinner-wrap {
    width: 72px; height: 72px;
    margin: 0 auto 24px;
    position: relative;
}
.ic-spinner-ring {
    width: 72px; height: 72px;
    border: 5px solid #ede9fe;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: ic-spin .9s linear infinite;
}
.ic-spinner-icon {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    color: #6366f1;
}
@keyframes ic-spin { to { transform: rotate(360deg); } }

/* Bouncing dots */
.ic-dots { margin-bottom: 6px; }
.ic-dots span {
    display: inline-block;
    width: 7px; height: 7px;
    background: #a78bfa;
    border-radius: 50%;
    margin: 0 3px;
    animation: ic-bounce .9s infinite;
}
.ic-dots span:nth-child(2) { animation-delay: .18s; }
.ic-dots span:nth-child(3) { animation-delay: .36s; }
@keyframes ic-bounce {
    0%,80%,100% { transform: translateY(0)   scale(.7); opacity: .4; }
    40%          { transform: translateY(-5px) scale(1);  opacity: 1; }
}
.ic-poll-note { font-size: 11px; color: #c4b5fd; margin-top: 14px; }

/* State icon circles */
.ic-state-icon {
    width: 68px; height: 68px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    margin: 0 auto 18px;
}
.ic-state-icon.success { background: #f0fdf4; border: 2px solid #bbf7d0; color: #16a34a; }
.ic-state-icon.danger  { background: #fff1f2; border: 2px solid #fecdd3; color: #dc2626; }
.ic-state-icon.warning { background: #fffbeb; border: 2px solid #fde68a; color: #d97706; }

/* Result image */
.ic-result-img {
    max-width: 100%;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    margin: 16px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
}

/* Badge */
.ic-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f5f3ff;
    border: 1px solid #ede9fe;
    border-radius: 100px;
    padding: 4px 14px;
    font-size: 11px;
    color: #6366f1;
    font-weight: 500;
    margin-bottom: 20px;
}

/* Notice box */
.ic-notice {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 12px;
    color: #92400e;
    margin-bottom: 20px;
    line-height: 1.7;
    text-align: left;
}

/* Hidden states */
#ic-result, #ic-failed, #ic-expired { display: none; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .ic-layout { flex-direction: column; }
    .ic-sidebar { width: 100%; }
    .ic-card-status { padding: 32px 20px; }
}
