/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    min-height: 100vh;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.95);
}

/* Header Styles */
.header {
    background: #fff;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo img {
    vertical-align: middle;
    height: 40px;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Verification Container */
.verification-container {
    width: 100%;
    max-width: 600px;
}

.verification-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    text-align: center;
    margin-top: 28px;
    margin-bottom: 28px;
}

.card-header {
    margin-bottom: 2rem;
}

.icon-container {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
}

.card-header h1 {
    font-size: 2.2rem;
    font-weight: 600;
    color: #333;
}

.card-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Form Styles */
.verification-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder {
    color: #999;
}

/* Button Styles */
.btn-primary,
.btn-secondary {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 150px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

/* Message Styles */
.message-placeholder {
    margin-top: 1rem;
}

.success-message,
.error-message {
    padding: 1rem;
    border-radius: 12px;
    font-weight: 500;
    margin-bottom: 1rem;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.hidden {
    display: none;
}

/* Verified Page Styles */
.verified-header {
    margin-bottom: 2rem;
}

.verified-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #28a745, #20c997);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
}

.verified-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: #28a745;
    margin-bottom: 0.5rem;
}

.verified-subtitle {
    color: #666;
    font-size: 1.2rem;
}

.certificate-details {
    margin-bottom: 2rem;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.details-table tr {
    border-bottom: 1px solid #e0e0e0;
}

.details-table td {
    padding: 1rem;
    text-align: left;
}

.details-table .label {
    font-weight: 600;
    color: #333;
    width: 40%;
}

.details-table .value {
    color: #666;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Unverified Page Styles */
.unverified-header {
    margin-bottom: 2rem;
}

.unverified-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
}

.unverified-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: #dc3545;
    margin-bottom: 0.5rem;
}

.unverified-subtitle {
    color: #666;
    font-size: 1.2rem;
}

.error-details {
    margin-bottom: 2rem;
}

.error-box {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 2rem;
    text-align: left;
}

.error-box h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.certificate-id {
    font-family: 'Courier New', monospace;
    background: #e9ecef;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.error-message {
    margin-bottom: 1.5rem;
}

.suggestions h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.suggestions ul {
    padding-left: 1.5rem;
}

.suggestions li {
    margin-bottom: 0.3rem;
    color: #666;
}

/* Login Page Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.login-header {
    margin-bottom: 2rem;
}

.login-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
}

.login-header h1 {
    font-size: 2.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #666;
    font-size: 1.1rem;
}

.login-form {
    margin-bottom: 1.5rem;
}

.login-message-placeholder {
    margin-bottom: 1.5rem;
}

.invalid-login-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 500;
}

.login-footer {
    margin-top: 2rem;
}

.back-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #764ba2;
}

/* Dashboard Styles */
.dashboard-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.dashboard-header {
    background: #fff;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.dashboard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-user {
    color: #666;
    font-weight: 500;
}

.logout-btn {
    background: #dc3545;
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.dashboard-main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-title {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

.dashboard-title h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.dashboard-title p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.dashboard-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.card-header {
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f8f9fa;
}

.card-header h2 {
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

.card-header svg {
    color: #667eea;
}

/* Form Styles for Dashboard */
.add-certificate-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.success-placeholder {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 500;
    margin-top: 1rem;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

.certificate-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.certificate-table th,
.certificate-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.certificate-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.certificate-table td {
    color: #666;
}

.delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.delete-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Footer */
.footer,
.dashboard-footer {
    background: #f8f9fa;
    padding: 1.5rem;
    text-align: center;
    color: #666;
    margin-top: auto;
}

.dashboard-footer {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .verification-card {
        padding: 2rem 1.5rem;
    }

    .card-header h1,
    .verified-title,
    .unverified-title {
        font-size: 1.8rem;
    }

    .login-card {
        padding: 2rem 1.5rem;
    }

    .dashboard-nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .admin-actions {
        justify-content: center;
    }

    .dashboard-title h1 {
        font-size: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
    }

    .details-table .label {
        width: 35%;
        font-size: 0.9rem;
    }

    .details-table .value {
        font-size: 0.9rem;
    }

    .certificate-table {
        font-size: 0.85rem;
    }

    .certificate-table th,
    .certificate-table td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem;
    }

    .verification-card {
        padding: 1.5rem 1rem;
    }

    .login-card {
        padding: 1.5rem 1rem;
    }

    .dashboard-main {
        padding: 1rem;
    }

    .dashboard-card {
        padding: 1.5rem 1rem;
    }

    .card-header {
        text-align: center;
    }

    .details-table .label {
        width: 40%;
    }
}

@media (min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }

    .certificate-list {
        grid-column: span 2;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .action-buttons {
        display: none;
    }

    .verification-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    body {
        background: white;
    }
}