/* 
   Shopee Cuan Max - Premium Bright Professional Theme
   Style: Glassmorphism Light & Shopee Coral Accents
*/

:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.82);
    --border-glass: rgba(15, 23, 42, 0.08);
    --shadow-glass: 0 10px 30px -10px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.03);
    --shadow-hover: 0 20px 40px -15px rgba(255, 87, 34, 0.12), 0 4px 20px rgba(0, 0, 0, 0.04);
    
    --accent: #ff5722; /* Vibrant Premium Shopee Coral */
    --accent-glow: rgba(255, 87, 34, 0.15);
    --accent-hover: #e64a19;
    
    --text-main: #0f172a; /* Slate 900 */
    --text-muted: #64748b; /* Slate 500 */
    --text-light: #475569; /* Slate 600 */
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.1);
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.1);
    
    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Settings */
body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Background Glowing Orbs (Soft and Bright) */
.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}
.glass-bg::before, .glass-bg::after {
    content: '';
    position: absolute;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    filter: blur(130px);
    opacity: 0.25;
}
.glass-bg::before {
    background: #ff7043; /* Soft Shopee Coral */
    top: -80px;
    right: -80px;
}
.glass-bg::after {
    background: #93c5fd; /* Soft Sky Blue */
    bottom: -80px;
    left: -100px;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.app-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}
.header-container {
    height: 75px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}
.logo-icon {
    color: var(--accent);
    filter: drop-shadow(0 2px 4px var(--accent-glow));
}
.logo-accent {
    color: var(--accent);
}

/* Navigation */
.main-nav {
    margin-left: auto;
    margin-right: 30px;
}
.nav-list {
    display: flex;
    list-style: none;
    gap: 15px;
}
.nav-list a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}
.nav-list a:hover {
    color: var(--accent);
    background: rgba(255, 87, 34, 0.05);
}
.nav-list a.active {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* User Profile Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}
.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
}
.user-role {
    font-size: 11px;
}

/* Main Content Area */
.app-main {
    flex: 1;
    padding-top: 30px;
    padding-bottom: 50px;
}

/* Footer */
.app-footer {
    background: #ffffff;
    border-top: 1px solid var(--border-glass);
    padding: 25px 0;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}
.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.footer-credit {
    font-weight: 500;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}
.page-title-section h1 {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
    color: var(--text-main);
}
.subtitle {
    color: var(--text-muted);
    font-size: 14px;
}

/* Cards (Glassmorphism Light) */
.card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-glass);
    position: relative;
    overflow: hidden;
}

/* Forms */
.form-card-container {
    max-width: 700px;
    margin: 0 auto;
    background: #ffffff;
}
.form-group-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.input-control {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.input-control label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}
.input-control label .required {
    color: var(--danger);
}
.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
}
.input-icon.textarea-icon {
    top: 18px;
}
.input-control input[type="text"],
.input-control input[type="password"],
.input-control input[type="url"],
.input-control input[type="date"],
.input-control select,
.input-control textarea {
    width: 100%;
    padding: 13px 16px 13px 44px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: var(--font-family);
    font-size: 14.5px;
    transition: var(--transition);
    outline: none;
}
.input-control input[type="file"] {
    width: 100%;
    padding: 11px 16px 11px 44px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: var(--font-family);
    cursor: pointer;
}
.input-control textarea {
    resize: vertical;
    min-height: 100px;
}
.input-control input:focus,
.input-control select:focus,
.input-control textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: #ffffff;
}
.input-disabled {
    background: #f1f5f9 !important;
    color: var(--text-muted) !important;
    cursor: not-allowed;
}
.form-help-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Dynamic Links Section */
.links-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.links-input-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.link-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.flex-grow {
    flex: 1;
}

/* Table Design */
.table-responsive {
    overflow-x: auto;
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}
.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background: #ffffff;
}
.table th, .table td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-glass);
    font-size: 14px;
}
.table th {
    font-weight: 700;
    color: var(--text-light);
    background: #f1f5f9;
    text-transform: uppercase;
    font-size: 11.5px;
    letter-spacing: 0.5px;
}
.table tbody tr:last-child td {
    border-bottom: none;
}
.table tbody tr {
    transition: var(--transition);
}
.table tbody tr:hover {
    background: rgba(248, 250, 252, 0.8);
}
.text-right {
    text-align: right;
}
.text-center {
    text-align: center;
}
.text-muted {
    color: var(--text-muted);
}
.username-code {
    background: rgba(255, 87, 34, 0.06);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
}

/* User Cell */
.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}
.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

/* Badges */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}
.badge-admin {
    background: #ecfdf5;
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.badge-user {
    background: #eff6ff;
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 14px;
    padding: 11px 22px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    outline: none;
}
.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px 0 var(--accent-glow);
}
.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 6px 18px 0 var(--accent-glow);
    transform: translateY(-1px);
}
.btn-secondary {
    background: #f1f5f9;
    color: var(--text-light);
    border: 1px solid #e2e8f0;
}
.btn-secondary:hover {
    background: #e2e8f0;
    color: var(--text-main);
}
.btn-outline {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: var(--text-light);
}
.btn-outline:hover {
    background: #f8fafc;
    border-color: var(--text-muted);
    color: var(--text-main);
}
.btn-danger {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 4px 12px 0 rgba(239, 68, 68, 0.2);
}
.btn-success {
    background: #ecfdf5;
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.btn-success:hover {
    background: var(--success);
    color: #fff;
    box-shadow: 0 4px 12px 0 rgba(16, 185, 129, 0.2);
}
.btn-warning {
    background: #fffbeb;
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.btn-warning:hover {
    background: var(--warning);
    color: #fff;
    box-shadow: 0 4px 12px 0 rgba(245, 158, 11, 0.2);
}
.btn-muted {
    background: #f8fafc;
    color: var(--text-muted);
    border: 1px solid #e2e8f0;
}
.btn-muted:hover {
    background: #f1f5f9;
    color: var(--text-main);
}
.btn-block {
    width: 100%;
}
.btn-group {
    display: inline-flex;
    gap: 6px;
}

/* Alert Notification Banner */
.alert {
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideDown 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
.alert-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}
.alert-icon {
    font-size: 16px;
}
.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.alert-close {
    background: transparent;
    border: none;
    color: currentColor;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.6;
    transition: var(--transition);
}
.alert-close:hover {
    opacity: 1;
}

/* Login Page Layout */
.login-wrapper {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-card {
    width: 100%;
    max-width: 440px;
    padding: 35px;
    background: #ffffff;
}
.login-header {
    text-align: center;
    margin-bottom: 25px;
}
.login-logo-icon {
    font-size: 44px;
    color: var(--accent);
    margin-bottom: 14px;
    filter: drop-shadow(0 2px 4px var(--accent-glow));
}
.login-header h2 {
    font-size: 23px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}
.login-header p {
    color: var(--text-muted);
    font-size: 13.5px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}
.no-data-card {
    grid-column: 1 / -1;
    padding: 60px 40px;
    background: #ffffff;
}
.large-icon {
    font-size: 45px;
    color: var(--text-muted);
    margin-bottom: 15px;
}
.margin-top {
    margin-top: 15px;
}

/* Product Card Design */
.product-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    background: #ffffff;
    transition: var(--transition);
    border: 1px solid rgba(15, 23, 42, 0.05);
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(255, 87, 34, 0.15);
}
.product-image-container {
    position: relative;
    width: 100%;
    height: 190px;
    background: #f1f5f9;
    border-bottom: 1px solid var(--border-glass);
}
.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    gap: 6px;
    font-size: 13px;
}
.product-placeholder-img i {
    font-size: 36px;
}
.product-badge-date {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.product-badge-status {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    z-index: 2;
}
.status-belum {
    background: var(--danger);
    color: #ffffff;
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.status-selesai {
    background: var(--success);
    color: #ffffff;
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.product-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-title {
    font-size: 17.5px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
    line-height: 1.35;
}
.product-description {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.55;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 60px; /* Consistent block height */
}
.product-meta {
    margin-top: auto;
    font-size: 11.5px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-glass);
    padding-top: 12px;
    margin-bottom: 12px;
}
.product-links-section h4 {
    font-size: 11.5px;
    color: var(--text-main);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.product-link-item {
    background: rgba(255, 87, 34, 0.06);
    color: var(--accent);
    border: 1px solid rgba(255, 87, 34, 0.15);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.product-link-item:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 2px 8px var(--accent-glow);
}

.product-actions {
    display: flex;
    gap: 10px;
    padding: 16px 20px 20px;
    border-top: 1px solid var(--border-glass);
    background: #fafafa;
}

/* Image Preview in Edit Screen */
.edit-image-preview-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 12px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid #e2e8f0;
}
.edit-image-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.preview-label {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    color: #ffffff;
    text-align: center;
    padding: 3px 0;
    font-size: 9px;
    font-weight: 600;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Breakpoints & Mobile Optimization */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
        gap: 15px;
    }
    .main-nav {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }
    .nav-list {
        justify-content: center;
        width: 100%;
        gap: 10px;
    }
    .nav-list a {
        padding: 8px 12px;
        font-size: 13.5px;
    }
    .user-menu {
        width: 100%;
        justify-content: space-between;
        border-top: 1px solid var(--border-glass);
        padding-top: 12px;
    }
    .app-main {
        padding-top: 20px;
        padding-bottom: 40px;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 20px;
    }
    .page-header .btn {
        width: 100%;
    }
    .page-title-section h1 {
        font-size: 26px;
    }
    .card {
        padding: 20px;
    }
    .form-card-container {
        padding: 20px;
    }
    .products-grid {
        grid-template-columns: 1fr; /* Stack vertically on small screens */
        gap: 20px;
    }
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* Copy All Button and Links Header */
.product-links-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.copy-all-btn {
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: var(--transition);
}
.copy-all-btn:hover {
    background: rgba(255, 87, 34, 0.08);
}

/* Search Section styles */
.search-section {
    margin-bottom: 25px;
    position: relative;
    width: 100%;
}
.search-input {
    width: 100% !important;
    padding: 14px 16px 14px 48px !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: var(--radius-md) !important;
    font-size: 15px !important;
    outline: none;
    transition: var(--transition);
}
.search-input:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--accent-glow) !important;
}
.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
}
