/* MWB Content Manager - Frontend Styles */
:root {
    --mwb-primary: #E8521A;
    --mwb-primary-dark: #c44415;
    --mwb-success: #27ae60;
    --mwb-warning: #f39c12;
    --mwb-danger: #e74c3c;
    --mwb-info: #3498db;
    --mwb-gray: #6c757d;
    --mwb-light: #f8f9fa;
    --mwb-border: #dee2e6;
    --mwb-radius: 8px;
    --mwb-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* ===== FORM ===== */
.mwb-form-wrap {
    background: #fff;
    border-radius: var(--mwb-radius);
    box-shadow: var(--mwb-shadow);
    padding: 32px;
    max-width: 700px;
    margin: 0 auto 40px;
}

.mwb-form-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--mwb-primary);
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--mwb-border);
}

.mwb-field {
    margin-bottom: 20px;
}

.mwb-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    font-size: 14px;
}

.mwb-field label .required {
    color: var(--mwb-danger);
    margin-left: 2px;
}

.mwb-field input[type="text"],
.mwb-field input[type="email"],
.mwb-field select,
.mwb-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--mwb-border);
    border-radius: var(--mwb-radius);
    font-size: 15px;
    color: #333;
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.mwb-field input[type="text"]:focus,
.mwb-field select:focus,
.mwb-field textarea:focus {
    outline: none;
    border-color: var(--mwb-primary);
    box-shadow: 0 0 0 3px rgba(232,82,26,0.1);
}

.mwb-field textarea {
    resize: vertical;
    min-height: 160px;
    font-family: inherit;
}

.mwb-field input[type="file"] {
    display: block;
    padding: 8px 0;
    font-size: 14px;
}

.mwb-field small {
    display: block;
    color: var(--mwb-gray);
    font-size: 12px;
    margin-top: 4px;
}

#mwb-photo-preview {
    margin-top: 10px;
}

#mwb-photo-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: var(--mwb-radius);
    border: 2px solid var(--mwb-border);
    object-fit: cover;
}

/* ===== BUTTONS ===== */
.mwb-btn {
    display: inline-block;
    padding: 11px 28px;
    border-radius: var(--mwb-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
}

.mwb-btn-primary {
    background: var(--mwb-primary);
    color: #fff;
}

.mwb-btn-primary:hover {
    background: var(--mwb-primary-dark);
    color: #fff;
}

.mwb-btn-outline {
    background: transparent;
    color: var(--mwb-primary);
    border: 2px solid var(--mwb-primary);
    font-size: 13px;
    padding: 7px 16px;
}

.mwb-btn-outline:hover {
    background: var(--mwb-primary);
    color: #fff;
}

/* ===== NOTICES ===== */
.mwb-notice {
    padding: 14px 18px;
    border-radius: var(--mwb-radius);
    margin-bottom: 20px;
    font-size: 15px;
}

.mwb-notice-success { background: #d4edda; border-left: 4px solid var(--mwb-success); color: #155724; }
.mwb-notice-error   { background: #f8d7da; border-left: 4px solid var(--mwb-danger);  color: #721c24; }
.mwb-notice-warning { background: #fff3cd; border-left: 4px solid var(--mwb-warning); color: #856404; }
.mwb-notice-info    { background: #d1ecf1; border-left: 4px solid var(--mwb-info);    color: #0c5460; }

.mwb-notice a { color: inherit; font-weight: 600; }

/* ===== BADGES ===== */
.mwb-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.mwb-badge-success { background: #d4edda; color: #155724; }
.mwb-badge-warning { background: #fff3cd; color: #856404; }
.mwb-badge-info    { background: #d1ecf1; color: #0c5460; }

/* ===== GRID CARDS ===== */
.mwb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.mwb-card {
    background: #fff;
    border-radius: var(--mwb-radius);
    box-shadow: var(--mwb-shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.mwb-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.mwb-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.mwb-card-body {
    padding: 20px;
}

.mwb-card-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.4;
}

.mwb-card-title a {
    color: #222;
    text-decoration: none;
}

.mwb-card-title a:hover {
    color: var(--mwb-primary);
}

.mwb-card-excerpt {
    color: var(--mwb-gray);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 14px;
}

.mwb-card-meta {
    display: flex;
    gap: 14px;
    font-size: 13px;
    color: var(--mwb-gray);
    margin-bottom: 14px;
}

/* ===== SUBMISSIONS TABLE ===== */
.mwb-submissions h3 {
    color: var(--mwb-primary);
    font-size: 20px;
    margin-bottom: 16px;
}

.mwb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
    border-radius: var(--mwb-radius);
    overflow: hidden;
    box-shadow: var(--mwb-shadow);
}

.mwb-table th {
    background: var(--mwb-primary);
    color: #fff;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
}

.mwb-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--mwb-border);
}

.mwb-table tr:last-child td { border-bottom: none; }
.mwb-table tr:hover td { background: var(--mwb-light); }

.mwb-empty {
    color: var(--mwb-gray);
    font-style: italic;
    text-align: center;
    padding: 40px;
}

/* ===== LOADING STATE ===== */
.mwb-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .mwb-form-wrap { padding: 20px; }
    .mwb-grid { grid-template-columns: 1fr; }
    .mwb-card-meta { flex-direction: column; gap: 4px; }
}

/* ===== FIELD ROW (dua kolom) ===== */
.mwb-field-row {
    display: flex;
    gap: 16px;
}
.mwb-field.mwb-half {
    flex: 1;
}
@media (max-width: 600px) {
    .mwb-field-row { flex-direction: column; gap: 0; }
}

/* ===== TOMBOL NAVIGASI HALAMAN LOGIN ===== */
.mwb-login-buttons {
    margin-top: 20px;
    text-align: center;
}
.mwb-login-buttons-label {
    color: var(--mwb-gray);
    font-size: 15px;
    margin-bottom: 16px;
}
.mwb-login-buttons-wrap {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.mwb-btn-lg {
    font-size: 16px;
    padding: 14px 32px;
}
.mwb-btn-green {
    background: #1E8C45;
    color: #fff;
    border: none;
}
.mwb-btn-green:hover {
    background: #166b34;
    color: #fff;
}

/* ===== MEMBER DASHBOARD ===== */
.mwb-member-dashboard {
    max-width: 700px;
    margin: 0 auto 40px;
}

.mwb-member-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    padding: 20px 24px;
    margin-bottom: 28px;
    position: relative;
}

.mwb-avatar-img {
    width: 64px !important;
    height: 64px !important;
    border-radius: 50% !important;
    border: 3px solid var(--mwb-primary);
    object-fit: cover;
}

.mwb-member-info {
    flex: 1;
}

.mwb-member-name {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin-bottom: 2px;
}

.mwb-member-email {
    font-size: 13px;
    color: var(--mwb-gray);
    margin-bottom: 4px;
}

.mwb-member-role {
    font-size: 13px;
    color: var(--mwb-success);
    font-weight: 600;
}

.mwb-logout-btn {
    background: #f1f1f1;
    color: #555;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.mwb-logout-btn:hover {
    background: #e74c3c;
    color: #fff;
}

.mwb-dashboard-label {
    color: var(--mwb-gray);
    font-size: 15px;
    margin-bottom: 16px;
    text-align: center;
}

.mwb-dashboard-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.mwb-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 20px;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}

.mwb-action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    text-decoration: none;
}

.mwb-action-edukasi {
    background: linear-gradient(135deg, #E8521A, #f07843);
    color: #fff;
}

.mwb-action-kegiatan {
    background: linear-gradient(135deg, #1E8C45, #2db35a);
    color: #fff;
}

.mwb-action-icon {
    font-size: 40px;
    margin-bottom: 10px;
    display: block;
}

.mwb-action-label {
    font-size: 16px;
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
    color: #fff;
}

.mwb-action-desc {
    font-size: 13px;
    opacity: 0.85;
    display: block;
    color: #fff;
}

/* ===== MULTI FOTO UPLOAD ===== */
.mwb-photo-drop-area {
    border: 2px dashed var(--mwb-border);
    border-radius: var(--mwb-radius);
    padding: 28px;
    text-align: center;
    cursor: pointer;
    color: var(--mwb-gray);
    font-size: 15px;
    transition: border-color 0.2s, background 0.2s;
}

.mwb-photo-drop-area:hover,
.mwb-photo-drop-area.drag-over {
    border-color: var(--mwb-primary);
    background: #fdf3ef;
    color: var(--mwb-primary);
}

.mwb-photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.mwb-photo-thumb {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: visible;
}

.mwb-photo-thumb img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--mwb-border);
    display: block;
}

.mwb-photo-thumb .mwb-remove-photo {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-weight: bold;
}

.mwb-photo-thumb .mwb-photo-badge {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--mwb-primary);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

/* ===== SUCCESS BOX ===== */
.mwb-success-box {
    text-align: center;
    padding: 40px 20px;
}

.mwb-success-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.mwb-success-box h4 {
    font-size: 22px;
    font-weight: 700;
    color: var(--mwb-success);
    margin-bottom: 10px;
}

.mwb-success-box p {
    color: var(--mwb-gray);
    font-size: 15px;
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .mwb-dashboard-actions { grid-template-columns: 1fr; }
    .mwb-member-card { flex-wrap: wrap; }
    .mwb-logout-btn { width: 100%; text-align: center; }
}

/* ===== FORCE OVERRIDE — action cards ===== */
.mwb-member-dashboard { max-width: 700px; margin: 20px auto 40px !important; font-family: inherit; }
.mwb-dashboard-label  { text-align: center !important; color: #666 !important; font-size: 15px !important; margin-bottom: 16px !important; display: block !important; }
.mwb-dashboard-actions { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 16px !important; }

.mwb-action-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 32px 20px !important;
    border-radius: 14px !important;
    text-decoration: none !important;
    text-align: center !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12) !important;
}
.mwb-action-card:hover { transform: translateY(-4px) !important; box-shadow: 0 10px 28px rgba(0,0,0,0.18) !important; }
.mwb-action-edukasi  { background: linear-gradient(135deg,#E8521A,#f07843) !important; }
.mwb-action-kegiatan { background: linear-gradient(135deg,#1E8C45,#2db35a) !important; }
.mwb-action-icon  { font-size: 44px !important; margin-bottom: 12px !important; display: block !important; }
.mwb-action-label { font-size: 17px !important; font-weight: 700 !important; color: #fff !important; display: block !important; margin-bottom: 6px !important; }
.mwb-action-desc  { font-size: 13px !important; color: rgba(255,255,255,0.85) !important; display: block !important; }

@media (max-width: 600px) {
    .mwb-dashboard-actions { grid-template-columns: 1fr !important; }
}
