* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}

/* Navigation */
.main-nav {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-top: 25px;
    padding: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.nav-link {
    color: white;
    padding: 14px 35px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    transition: all 0.3s ease;
    position: relative;
    background: transparent;
    flex: 1;
    text-align: center;
    min-width: 140px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
}

.nav-link.active {
    background: white;
    color: #667eea;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Auth Section */
#auth-section {
    background: white;
    border-radius: 15px;
    padding: 40px;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    font-size: 1.1em;
    cursor: pointer;
    color: #666;
    transition: all 0.3s;
}

.tab-btn.active {
    color: #667eea;
    border-bottom: 3px solid #667eea;
}

.auth-form input {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.auth-form input:focus {
    outline: none;
    border-color: #667eea;
}

.auth-form button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: transform 0.2s;
}

.auth-form button:hover {
    transform: translateY(-2px);
}

.error {
    color: #e74c3c;
    margin-top: 10px;
    font-size: 0.9em;
}

/* App Section */
#app-section {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 30px;
}

.user-info span {
    font-weight: 600;
    color: #667eea;
}

.btn-logout {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-logout::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-logout:hover::before {
    left: 100%;
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

.dashboard {
    margin-top: 30px;
}

.section {
    margin-bottom: 40px;
}

.section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.btn-primary {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-secondary {
    padding: 12px 24px;
    background: #e0e0e0;
    color: #333;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-success {
    padding: 12px 24px;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s;
}

.btn-success:hover {
    transform: translateY(-2px);
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="date"]:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.85em;
}

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

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Subscriptions List */
#subscriptions-list {
    margin-top: 20px;
}

.subscription-card {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.subscription-card:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.subscription-card h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.subscription-card .filters {
    display: grid;
    gap: 10px;
    margin-bottom: 15px;
}

.filter-item {
    display: flex;
    gap: 10px;
}

.filter-label {
    font-weight: 600;
    color: #666;
    min-width: 120px;
}

.filter-value {
    color: #333;
}

.subscription-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-delete {
    padding: 8px 16px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
}

.btn-toggle {
    padding: 8px 16px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.status-active {
    background: #2ecc71;
    color: white;
}

.status-inactive {
    background: #95a5a6;
    color: white;
}

/* Tender Search Results */
.tender-results {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.tender-card {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s;
}

.tender-card:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.tender-card h4 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.tender-details {
    display: grid;
    gap: 10px;
    margin-bottom: 15px;
}

.tender-detail-item {
    display: flex;
    gap: 10px;
}

.detail-label {
    font-weight: 600;
    color: #666;
    min-width: 150px;
}

.detail-value {
    color: #333;
}

.tender-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Advanced Filters */
.filter-section {
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.filter-header {
    width: 100%;
    padding: 15px 20px;
    background: #f8f9fa;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.05em;
    font-weight: 600;
    transition: background 0.3s;
}

.filter-header:hover {
    background: #e9ecef;
}

.filter-header span:first-child {
    color: #333;
}

.filter-toggle {
    color: #667eea;
    transition: transform 0.3s;
}

.filter-header.active .filter-toggle {
    transform: rotate(180deg);
}

.filter-content {
    padding: 20px;
    display: none;
    border-top: 1px solid #e0e0e0;
}

.filter-content.show {
    display: block;
}

/* Checkbox Layouts */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-grid label,
.checkbox-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95em;
}

.checkbox-grid label:hover,
.checkbox-list label:hover {
    background: #f0f0f0;
}

.checkbox-grid input[type="checkbox"],
.checkbox-list input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.checkbox-grid input[type="checkbox"]:checked + span,
.checkbox-list input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: #667eea;
}

/* Filter Badge */
.filter-badge {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    margin-left: 8px;
    min-width: 20px;
    text-align: center;
}

footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    padding: 20px;
    opacity: 0.8;
}
