/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&family=Sarabun:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: 'Sarabun', 'Prompt', sans-serif;
}

/* ========== Sidebar Styles ========== */
.sidebar {
    width: 280px;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    box-shadow: 2px 0 20px rgba(0,0,0,0.1);
    transition: all 0.3s;
    z-index: 1000;
}

.sidebar-brand {
    padding: 30px 25px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.sidebar-brand i {
    font-size: 40px;
    color: #ffd700;
}

.sidebar-brand h3 {
    color: #667eea;
    margin-top: 10px;
    font-weight: bold;
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-menu .menu-item {
    padding: 12px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #4a5568;
    text-decoration: none;
    transition: 0.3s;
    margin: 5px 15px;
    border-radius: 12px;
}

.sidebar-menu .menu-item i {
    width: 24px;
    font-size: 18px;
}

.sidebar-menu .menu-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.sidebar-menu .menu-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px 25px;
    border-top: 1px solid #e2e8f0;
}

/* ========== Main Content ========== */
.main-content {
    margin-left: 280px;
    padding: 30px;
    min-height: 100vh;
}

/* ========== Cards ========== */
.card-custom {
    background: white;
    border-radius: 25px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    animation: fadeInUp 0.5s ease-out;
}

.welcome-card {
    background: white;
    border-radius: 25px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.welcome-card h1 {
    font-size: 2rem;
    color: #2d3748;
}

.welcome-card .badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    color: white;
}

/* ========== Stats Cards ========== */
.stats-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    height: 100%;
}

.stats-card:hover {
    transform: translateY(-5px);
}

.stats-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.stats-icon i {
    font-size: 30px;
    color: white;
}

.stats-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2d3748;
}

.stats-label {
    color: #718096;
    font-size: 0.9rem;
}

/* ========== Certificate Cards ========== */
.cert-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-left: 5px solid;
}

.cert-card:hover {
    transform: translateX(5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.cert-card.active { border-left-color: #48bb78; }
.cert-card.pending { border-left-color: #ed8936; }
.cert-card.revoked { border-left-color: #f56565; }
.cert-card.expired { border-left-color: #a0aec0; }

.cert-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 15px;
}

.cert-title i {
    color: #ffd700;
    margin-right: 10px;
}

.cert-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.cert-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4a5568;
}

.cert-info-item i {
    width: 20px;
    color: #667eea;
}

/* ========== Status Badges ========== */
.status-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-active { background: #c6f6d5; color: #22543d; }
.status-pending { background: #feebc8; color: #7b341e; }
.status-revoked { background: #fed7d7; color: #742a2a; }
.status-expired { background: #e2e8f0; color: #4a5568; }

/* ========== Buttons ========== */
.btn-primary-custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: bold;
    transition: transform 0.3s;
    display: inline-block;
    text-decoration: none;
}

.btn-primary-custom:hover {
    transform: scale(1.02);
    color: white;
}

.btn-outline-custom {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 500;
    transition: 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-outline-custom:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.btn-fast {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.btn-proof {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.btn-success-custom {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.btn-warning-custom {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

.btn-danger-custom {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

.btn-cert {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.85rem;
    transition: transform 0.3s;
    margin-right: 10px;
    text-decoration: none;
    display: inline-block;
}

.btn-cert:hover {
    transform: scale(1.05);
    color: white;
}

.btn-cert-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.85rem;
    transition: 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-cert-outline:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* ========== Form Controls ========== */
.form-control, .form-select {
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    padding: 12px 16px;
    transition: 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

/* ========== Tabs ========== */
.nav-tabs-custom {
    border-bottom: none;
    gap: 15px;
    margin-bottom: 30px;
}

.nav-tabs-custom .nav-link {
    background: #f7fafc;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    color: #4a5568;
    font-weight: 500;
    transition: 0.3s;
}

.nav-tabs-custom .nav-link:hover {
    background: #e2e8f0;
}

.nav-tabs-custom .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* ========== Option Cards ========== */
.option-card {
    background: #f7fafc;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    height: 100%;
}

.option-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    background: white;
}

.option-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.option-icon i {
    font-size: 35px;
    color: white;
}

.option-card h5 {
    color: #2d3748;
    margin-bottom: 10px;
}

/* ========== Serial Info Card ========== */
.serial-info-card {
    background: #f7fafc;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 25px;
    border-left: 4px solid #667eea;
}

/* ========== Preview Image ========== */
.preview-image {
    max-width: 200px;
    margin-top: 10px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ========== Alert ========== */
.alert-custom {
    border-radius: 15px;
    border: none;
    padding: 15px 20px;
}

/* ========== Empty State ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 20px;
}

.empty-state i {
    font-size: 80px;
    color: #cbd5e0;
    margin-bottom: 20px;
}

/* ========== Table ========== */
.table-custom {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.table-custom thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.table-custom th, .table-custom td {
    padding: 15px;
    vertical-align: middle;
}

/* ========== Modal ========== */
.modal-content {
    border-radius: 20px;
    border: none;
}

.modal-header {
    border-bottom: none;
    padding: 20px 25px;
}

.modal-footer {
    border-top: none;
    padding: 20px 25px;
}

/* ========== Animation ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    .menu-toggle {
        display: block;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1001;
        background: white;
        padding: 10px 15px;
        border-radius: 10px;
        cursor: pointer;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    .cert-info {
        flex-direction: column;
        gap: 8px;
    }
    .cert-actions {
        margin-top: 15px;
        text-align: left;
    }
}

@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
}
