* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f7fc;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background:  linear-gradient(135deg, #4257b5 0%, #5f2c93 100%);
}

.form-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 35px rgba(0,0,0,0.1);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    transition: transform 0.3s;
}

.form-card h2 {
    margin-bottom: 24px;
    color: #333;
    text-align: center;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    width: 100%;
    padding: 12px;
    background: #667eea;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover {
    background: #5a67d8;
}

.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.alert.error {
    background: #fed7d7;
    color: #9b2c2c;
    border-left: 4px solid #e53e3e;
}

.alert.success {
    background: #c6f6d5;
    color: #22543d;
    border-left: 4px solid #38a169;
}

.text-center {
    text-align: center;
    margin-top: 20px;
}

.navbar {
    background: #2d3748;
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.brand {
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.nav-menu {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.user-welcome {
    font-weight: 500;
    background: #4a5568;
    padding: 6px 12px;
    border-radius: 20px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 0.2s;
}

.nav-link:hover {
    background: #4a5568;
}

.main-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    flex: 1;
}

.search-section {
    text-align: center;
    margin-bottom: 40px;
}

.search-section h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #2c3e50;
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.search-form input {
    flex: 2;
    min-width: 250px;
    padding: 14px 18px;
    font-size: 16px;
    border: 2px solid #cbd5e0;
    border-radius: 40px;
    outline: none;
    transition: 0.2s;
}

.search-form input:focus {
    border-color: #667eea;
}

.btn-search, .btn-reset {
    padding: 12px 24px;
    border: none;
    border-radius: 40px;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
}

.btn-search {
    background: #667eea;
    color: white;
}

.btn-reset {
    background: #48bb78;
    color: white;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.document-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #edf2f7;
    display: flex;
    flex-direction: column;
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px rgba(0,0,0,0.1);
}

.doc-title {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 12px;
    border-left: 4px solid #667eea;
    padding-left: 12px;
}

.doc-description {
    color: #4a5568;
    margin-bottom: 16px;
    line-height: 1.5;
    flex-grow: 1;
}

.doc-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.85rem;
    color: #718096;
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
    margin-top: 8px;
}

.doc-actions {
    margin-top: 15px;
    text-align: right;
}

.btn-view {
    display: inline-block;
    padding: 8px 16px;
    background-color: #edf2f7;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-view:hover {
    background-color: #e2e8f0;
}

.no-results {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 20px;
    font-size: 1.2rem;
}

.footer {
    text-align: center;
    padding: 20px;
    background: #2d3748;
    color: #a0aec0;
    margin-top: auto;
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    .nav-menu {
        justify-content: center;
    }
    .search-form input {
        width: 100%;
    }
    .documents-grid {
        grid-template-columns: 1fr;
    }
}