/* ========================================
   METRONIC INSPIRED - Crow Certificates
   ======================================== */

:root {
    --primary: #0099CC;
    --primary-dark: #1E4DB7;
    --success: #1BC47D;
    --danger: #F1416C;
    --warning: #FFA500;
    --gray-light: #F5F7FA;
    --gray-border: #E3E6EF;
    --gray-text: #6C757D;
    --gray-dark: #495057;
    --white: #FFFFFF;
    --radius-sm: 4px;
    --radius: 6px;
    --radius-lg: 8px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--gray-dark);
    background: var(--gray-light);
    line-height: 1.6;
}

/* ========== GLOBAL STYLES ========== */

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

h1,
h2,
h3 {
    color: var(--gray-dark);
    margin-bottom: 20px;
    font-weight: 700;
}

h1 {
    font-size: 28px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

h2 {
    font-size: 20px;
    margin-top: 32px;
    position: relative;
    padding-left: 12px;
}

h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--primary);
    border-radius: var(--radius-sm);
}

/* ========== CARDS & CONTAINERS ========== */

.notice {
    background: var(--white);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 12px;
}

.notice-success {
    border-left-color: var(--success);
    background: linear-gradient(135deg, rgba(27, 196, 125, 0.05) 0%, rgba(27, 196, 125, 0.01) 100%);
}

.notice-error {
    border-left-color: var(--danger);
    background: linear-gradient(135deg, rgba(241, 65, 108, 0.05) 0%, rgba(241, 65, 108, 0.01) 100%);
}

.notice p {
    margin: 0;
    color: var(--gray-dark);
    font-weight: 500;
}

/* ========== FORMS ========== */

.crow-admin-form {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-border);
    padding: 28px;
    margin-bottom: 32px;
}

.form-table {
    width: 100%;
    border-collapse: collapse;
}

.form-table tr {
    border-bottom: 1px solid var(--gray-border);
}

.form-table tr:last-child {
    border-bottom: none;
}

.form-table th {
    background: var(--gray-light);
    color: var(--gray-dark);
    font-weight: 600;
    padding: 16px 20px;
    text-align: left;
    width: 30%;
}

.form-table td {
    padding: 16px 20px;
}

.form-table input,
.form-table textarea,
.form-table select {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    border: 1px solid var(--gray-border);
    border-radius: var(--radius);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    color: var(--gray-dark);
    transition: all 0.3s ease;
}

.form-table input:focus,
.form-table textarea:focus,
.form-table select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 153, 204, 0.1);
    background: var(--white);
}

.form-table textarea {
    min-height: 100px;
    resize: vertical;
}

/* ========== BUTTONS ========== */

.button {
    border-radius: var(--radius);
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.button-primary {
    background: var(--primary);
    color: var(--white);
}

.button-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(0, 153, 204, 0.3);
    transform: translateY(-2px);
}

.button-secondary {
    background: var(--gray-light);
    color: var(--gray-dark);
    border: 1px solid var(--gray-border);
}

.button-secondary:hover {
    background: var(--white);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.button-small {
    padding: 8px 16px;
    font-size: 12px;
}

.button-danger {
    background: var(--danger);
    color: var(--white);
}

.button-danger:hover {
    background: #D72847;
    box-shadow: 0 4px 12px rgba(241, 65, 108, 0.3);
}

/* ========== TABLES ========== */

.widefat {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 32px;
}

.widefat thead {
    background: linear-gradient(135deg, var(--gray-light) 0%, var(--gray-light) 100%);
}

.widefat th {
    color: var(--gray-dark);
    font-weight: 700;
    padding: 16px 20px;
    text-align: left;
    border-bottom: 2px solid var(--gray-border);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.widefat td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-border);
    color: var(--gray-text);
}

.widefat tbody tr {
    transition: all 0.3s ease;
}

.widefat tbody tr:hover {
    background: var(--gray-light);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.striped tbody tr:nth-child(even) {
    background: rgba(245, 247, 250, 0.5);
}

/* ========== SEARCH BOX ========== */

.crow-search-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-border);
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.crow-search-box input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--gray-border);
    border-radius: var(--radius);
    font-size: 14px;
}

.crow-search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 153, 204, 0.1);
}

/* ========== IMAGES ========== */

.crow-wrapper {
    max-width: 500px;
    margin: 48px auto;
    padding: 32px;
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-light) 100%);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    font-family: 'Cairo', 'Segoe UI', sans-serif;
}

.crow-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.crow-form input {
    padding: 14px 16px;
    border: 2px solid var(--gray-border);
    border-radius: var(--radius);
    font-size: 15px;
    color: var(--gray-dark);
    transition: all 0.3s ease;
}

.crow-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 153, 204, 0.1);
}

.crow-form button {
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.crow-form button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 153, 204, 0.3);
}

/* ========== RESULTS ========== */

.crow-success {
    margin-top: 24px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(27, 196, 125, 0.1) 0%, rgba(27, 196, 125, 0.05) 100%);
    border-left: 4px solid var(--success);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    animation: slideDown 0.3s ease;
}

.crow-success h3 {
    color: var(--success);
    font-size: 18px;
    margin-bottom: 12px;
}

.crow-success p {
    color: var(--gray-dark);
    margin-bottom: 10px;
    padding-left: 8px;
}

.crow-success img {
    max-width: 100%;
    height: auto;
    margin-top: 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.crow-error {
    margin-top: 24px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(241, 65, 108, 0.1) 0%, rgba(241, 65, 108, 0.05) 100%);
    border-left: 4px solid var(--danger);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    color: var(--danger);
    font-weight: 600;
    text-align: center;
    animation: slideDown 0.3s ease;
}

/* ========== ANIMATIONS ========== */

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ========== STATUS BADGES ========== */

.status-active {
    background: linear-gradient(135deg, rgba(27, 196, 125, 0.1) 0%, rgba(27, 196, 125, 0.05) 100%);
    color: var(--success);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 12px;
    display: inline-block;
}

.status-expired {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.1) 0%, rgba(255, 165, 0, 0.05) 100%);
    color: var(--warning);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 12px;
    display: inline-block;
}

.status-revoked {
    background: linear-gradient(135deg, rgba(241, 65, 108, 0.1) 0%, rgba(241, 65, 108, 0.05) 100%);
    color: var(--danger);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 12px;
    display: inline-block;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 768px) {
    .wrap {
        padding: 16px;
    }

    h1 {
        font-size: 22px;
    }

    .form-table input,
    .form-table textarea,
    .form-table select {
        max-width: 100%;
    }

    .crow-search-box {
        flex-direction: column;
    }

    .crow-wrapper {
        margin: 24px;
        padding: 20px;
    }

    .widefat {
        font-size: 12px;
    }

    .widefat th,
    .widefat td {
        padding: 12px;
    }
}

/* ========================================
   SHORTCODE STYLES - ENHANCED
   ======================================== */

.crow-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* Header */
.crow-header {
    background: linear-gradient(135deg, var(--primary) 0%, #0077AA 100%);
    color: white;
    padding: 60px 30px;
    text-align: center;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    margin-bottom: 0;
}

.crow-header-content h1 {
    color: white;
    font-size: 36px;
    margin-bottom: 12px;
}

.crow-header-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin: 0;
}

/* Search Container */
.crow-search-container {
    background: white;
    padding: 40px 30px;
    border-bottom: 1px solid var(--gray-border);
}

.crow-search-form {
    max-width: 600px;
    margin: 0 auto;
}

.crow-search-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.crow-search-input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid var(--gray-border);
    border-radius: var(--radius);
    font-size: 16px;
    transition: all 0.3s ease;
}

.crow-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 153, 204, 0.1);
}

.crow-search-button {
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, #0077AA 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 16px;
}

.crow-search-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.crow-search-button:active {
    transform: translateY(0);
}

.crow-search-hint {
    text-align: center;
    color: var(--gray-text);
    font-size: 14px;
    padding: 12px;
    background: #FFF3CD;
    border-left: 4px solid var(--warning);
    border-radius: var(--radius);
}

/* Results Container */
.crow-results-container {
    background: white;
    padding: 40px 30px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Success Banner */
.crow-success-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: linear-gradient(135deg, #D4EDDA 0%, #C3E6CB 100%);
    border-left: 4px solid var(--success);
    border-radius: var(--radius);
    margin-bottom: 30px;
}

.banner-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.banner-text h2 {
    color: #155724;
    margin-bottom: 4px;
    font-size: 22px;
}

.banner-text p {
    color: #0C5420;
    margin: 0;
    font-size: 14px;
}

/* Certificate Card */
.crow-certificate-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 30px;
    background: var(--gray-light);
    border-radius: var(--radius);
    margin-bottom: 30px;
}

.crow-details-section h3,
.crow-images-section h3 {
    color: var(--gray-dark);
    font-size: 18px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-border);
}

/* Detail Items */
.crow-detail-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-border);
    align-items: center;
}

.crow-detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--gray-text);
    font-size: 13px;
    text-transform: uppercase;
}

.detail-value {
    color: var(--gray-dark);
    font-size: 16px;
}

.detail-serial code {
    background: #F5F5F5;
    padding: 8px 12px;
    border-radius: 4px;
    color: #D63384;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
}

.status-active {
    background: #D4EDDA;
    color: #155724;
}

.status-expired {
    background: #FFF3CD;
    color: #856404;
}

.status-revoked {
    background: #F8D7DA;
    color: #721C24;
}

/* Images Section */
.crow-image-container,
.crow-qr-container {
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
}

.crow-image-container {
    margin-bottom: 20px;
}

.crow-certificate-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    display: block;
    margin: 16px auto 0;
}

.crow-qr-code {
    width: 200px;
    height: 200px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    margin: 16px auto 0;
    display: block;
}

.qr-hint {
    color: var(--gray-text);
    font-size: 12px;
    margin-top: 12px;
}

/* Actions */
.crow-actions {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--gray-border);
}

.crow-search-again-btn {
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, #0077AA 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.crow-search-again-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Error Container */
.crow-error-container {
    background: white;
    padding: 60px 30px;
    text-align: center;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.error-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.crow-error-container h3 {
    color: #721C24;
    font-size: 24px;
    margin-bottom: 12px;
}

.crow-error-container p {
    color: var(--gray-text);
    margin-bottom: 12px;
    font-size: 16px;
}

.error-hint {
    color: #856404;
    background: #FFFBEA;
    padding: 12px;
    border-radius: var(--radius);
    font-size: 14px;
    margin: 20px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .crow-certificate-card {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .crow-detail-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .crow-header-content h1 {
        font-size: 28px;
    }

    .crow-search-input-group {
        flex-direction: column;
    }

    .crow-search-button {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .wrap {
        padding: 12px;
    }

    .crow-admin-form {
        padding: 16px;
    }

    .crow-header {
        padding: 40px 16px;
    }

    .crow-search-container {
        padding: 20px 16px;
    }

    .crow-results-container {
        padding: 20px 16px;
    }

    .button {
        width: 100%;
        justify-content: center;
    }

    .crow-certificate-card {
        padding: 16px;
    }
}