/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #6c757d 100%);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        repeating-linear-gradient(
            45deg,
            rgba(255, 255, 255, 0.02) 0px,
            rgba(255, 255, 255, 0.02) 1px,
            transparent 1px,
            transparent 20px
        ),
        repeating-linear-gradient(
            -45deg,
            rgba(255, 255, 255, 0.02) 0px,
            rgba(255, 255, 255, 0.02) 1px,
            transparent 1px,
            transparent 20px
        );
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

/* Header styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #6c757d 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

/* Logo container - using actual logo image */
.logo-container {
    flex-shrink: 0;
}

.logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
    filter: brightness(1.1);
    transition: all 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.header-text {
    text-align: left;
    flex: 1;
}

.header-text h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header-text p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

/* Controls section */
.controls {
    padding: 25px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.controls-left {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #6c757d 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #5a6268 100%);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

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

.btn-danger {
    background: #dc3545;
    color: white;
}

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

.btn-success {
    background: #28a745;
    color: white;
}

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

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 15px;
    color: #6c757d;
    z-index: 2;
}

.search-box input {
    padding: 12px 15px 12px 45px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    width: 300px;
    transition: all 0.3s ease;
}

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

/* Tenants grid */
.tenants-grid {
    padding: 30px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.tenant-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.tenant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.tenant-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.tenant-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.tenant-date {
    font-size: 0.9rem;
    color: #6c757d;
}

.tenant-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 8px 12px;
    font-size: 0.9rem;
    border-radius: 6px;
}

.tenant-description {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.tenant-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #B8860B;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tenant-link:hover {
    color: #FFD700;
    transform: translateX(5px);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 80px 40px;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #495057;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    animation: slideIn 0.3s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 25px 30px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #6c757d 100%);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: white;
    font-size: 1.4rem;
}

.close {
    color: rgba(255, 255, 255, 0.8);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
    padding: 0;
    background: none;
    border: none;
}

.close:hover {
    color: white;
}

.form-group {
    margin-bottom: 25px;
}

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

/* Login modal specific styles */
#loginModal .modal-content {
    max-width: 400px;
}

#loginModal .form-group {
    margin-bottom: 20px;
}

#loginModal .form-group:last-of-type {
    margin-bottom: 0;
}

#loginModal .form-group label {
    font-size: 0.95rem;
    color: #495057;
}

#loginModal .form-group input {
    height: 45px;
    font-size: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

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

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Expiration options styles */
.expiration-options {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.radio-option:hover {
    background-color: #f8f9fa;
    border-color: #e9ecef;
}

.radio-option input[type="radio"] {
    margin: 0;
    width: 16px;
    height: 16px;
    accent-color: #667eea;
}

.radio-text {
    font-weight: 500;
    color: #495057;
    user-select: none;
}

.form-group input[type="date"]:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.7;
}

#tenantForm {
    padding: 25px 30px 30px;
}

#loginForm {
    padding: 30px 30px 25px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #f1f3f4;
}

/* Loading overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 10px;
    }
    
    .header {
        padding: 30px 20px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
        .logo-img {
        height: 45px;
    }
    
    .header-text {
        text-align: center;
    }
    
    .header-text h1 {
        font-size: 2rem;
    }
    
    .controls {
        padding: 20px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .tenants-grid {
        padding: 20px;
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tenant-card {
        padding: 20px;
    }
    
    .tenant-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .tenant-actions {
        align-self: flex-end;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    #loginModal .modal-content {
        width: 90%;
        margin: 20% auto;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    #loginModal .form-actions {
        flex-direction: row;
        gap: 10px;
    }
    
    .expiration-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .radio-option {
        padding: 12px;
        border: 1px solid #e9ecef;
        background-color: #f8f9fa;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
} 