/* 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-color: #f4f4f4;
}

/* Container styles */
.w-container, .w-container-login {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.w-container-login {
    max-width: 400px;
    margin-top: 100px;
    position: relative;
    left: auto;
    transform: none;
    text-align: center;
}

/* Header styles */
header {
    background: #2c3e50;
    color: white;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    margin: -20px -20px 20px -20px;
}

header h1 {
    margin-bottom: 10px;
    text-align: left;
    font-size: 2em;
}

nav {
    display: flex;
    gap: 20px;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav a:hover {
    background-color: rgba(255,255,255,0.2);
}

/* Form styles */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

label {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
    width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3498db;
}

input[type="submit"],
button {
    background-color: #3498db;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    width: auto;
}

input[type="submit"]:hover,
button:hover {
    background-color: #2980b9;
}

/* Dashboard specific */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.stat-card h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #3498db;
}

/* Properties grid */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.property-card {
    background: #ecf0f1;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.property-card h4 {
    margin-bottom: 8px;
    color: #2c3e50;
}

/* Table styles */
.activities-table {
    overflow-x: auto;
    margin-top: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #34495e;
    color: white;
    font-weight: bold;
}

tr:hover {
    background-color: #f5f5f5;
}

/* Error and success messages */
.error-message, #error-message {
    background-color: #e74c3c;
    color: white;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.success-message, #success-message {
    background-color: #27ae60;
    color: white;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Links */
a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .w-container, .w-container-login {
        margin: 10px;
        padding: 15px;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    nav {
        flex-direction: column;
        gap: 10px;
    }

    .properties-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Greetings and Profile Styles */
.w-greetings {
    font-weight: 600;
    font-size: 18px;
    color: #4a5568;
}

.w-profile {
    font-size: 14px;
}

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

.w-profile a:hover {
    color: #764ba2;
}

.back-to-dashboard {
    position: absolute;
    top: 20px;
    right: 30px;
}

.back-to-dashboard a {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-to-dashboard a:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 101, 101, 0.3);
}

/* Button Styles */
#refresh-button,
#sync-button,
#ReLoad-button {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-right: 15px;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

#refresh-button:hover,
#sync-button:hover,
#ReLoad-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(72, 187, 120, 0.3);
}

/* Form Field Styles */
.section {
    margin-bottom: 30px;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #2d3748;
    font-weight: 600;
}

.field-label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    display: block;
}

.field-value {
    margin-bottom: 15px;
}

.edit-field {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

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

.update-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.update-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* Landing Page Styles */
body > h1 {
    text-align: center;
    color: white;
    margin-top: 100px;
    font-size: 48px;
    font-weight: 300;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body > p {
    text-align: center;
    margin: 30px auto;
    max-width: 600px;
}

body > p a {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 15px 30px;
    margin: 10px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

body > p a:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}