/* Global Styles for JKRRS PRO Property Management */

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

:root {
    --primary: #1a4d2e;
    --primary-light: #2d6a4f;
    --accent: #b8860b;
    --background: #faf8f3;
    --text: #2c2c2c;
    --text-light: #6b6b6b;
    --business: #2b5f75;
    --commercial: #8b4513;
    --residential: #6b4d8b;
}

body {
    font-family: 'Work Sans', sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-header {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    font-weight: 900;
}

.brand-header h1 {
    font-size: 24px;
    color: var(--primary);
    font-weight: 700;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Logo Styles */
.logo {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 24px;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    font-weight: 900;
    box-shadow: 0 20px 60px rgba(26, 77, 46, 0.3);
    animation: float 3s ease-in-out infinite;
}

.logo-small {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 12px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    font-weight: 900;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 10px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(26, 77, 46, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(26, 77, 46, 0.2);
}

.logout-btn,
.back-btn {
    background: transparent;
    color: var(--text-light);
    padding: 12px 20px;
    border-radius: 10px;
    border: 2px solid #e5e5e5;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.logout-btn:hover,
.back-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    letter-spacing: 0.5px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(26, 77, 46, 0.3);
}

.add-property-btn {
    background: linear-gradient(135deg, var(--commercial) 0%, #a85a1f 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.add-property-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.3);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 30px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 500;
    font-size: 14px;
}

input,
textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Work Sans', sans-serif;
    transition: all 0.3s ease;
    background: white;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(26, 77, 46, 0.1);
}

textarea {
    min-height: 200px;
    resize: vertical;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Links */
.back-link {
    display: block;
    text-align: center;
    margin-top: 25px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--primary);
}

/* Decorative Elements */
.decorative-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
    margin: 40px auto;
    border-radius: 2px;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e5e5, transparent);
    margin: 30px 0;
}

/* Info Box */
.info-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 25px;
    border-left: 4px solid var(--accent);
}

.info-box p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
}

/* Section Cards */
.section-card {
    background: white;
    border-radius: 20px;
    padding: 40px 35px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: block;
}

.section-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    transition: height 0.3s ease;
}

.section-card.business::before {
    background: linear-gradient(90deg, var(--business), #3d7a94);
}

.section-card.commercial::before {
    background: linear-gradient(90deg, var(--commercial), #a85a1f);
}

.section-card.residential::before {
    background: linear-gradient(90deg, var(--residential), #8660a8);
}

.section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
}

.section-card:hover::before {
    height: 100%;
    opacity: 0.05;
}

.section-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 25px;
}

.section-card.business .section-icon {
    background: linear-gradient(135deg, var(--business) 0%, #3d7a94 100%);
}

.section-card.commercial .section-icon {
    background: linear-gradient(135deg, var(--commercial) 0%, #a85a1f 100%);
}

.section-card.residential .section-icon {
    background: linear-gradient(135deg, var(--residential) 0%, #8660a8 100%);
}

.section-card h3 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 700;
}

.section-card.business h3 {
    color: var(--business);
}

.section-card.commercial h3 {
    color: var(--commercial);
}

.section-card.residential h3 {
    color: var(--residential);
}

.section-card p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
}

.property-count {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    font-size: 14px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.property-count span {
    background: rgba(0, 0, 0, 0.05);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.stat-card h4 {
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
}

.stat-card .value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

/* Property Cards */
.property-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
}

.property-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #d4a574 0%, #c19460 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    position: relative;
    overflow: hidden;
}

.property-image::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none"/><path d="M0 50 Q 25 40, 50 50 T 100 50" stroke="rgba(255,255,255,0.1)" stroke-width="2" fill="none"/><path d="M0 60 Q 25 50, 50 60 T 100 60" stroke="rgba(255,255,255,0.08)" stroke-width="2" fill="none"/></svg>') repeat;
    opacity: 0.5;
}

.property-content {
    padding: 25px;
}

.property-name {
    font-size: 24px;
    color: var(--commercial);
    margin-bottom: 10px;
    font-weight: 700;
}

.property-address {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.property-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-item label {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-item value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

/* File Management */
.upload-area {
    border: 2px dashed #e5e5e5;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    margin-bottom: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--commercial);
    background: rgba(139, 69, 19, 0.02);
}

.upload-area .icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.upload-area p {
    color: var(--text-light);
    font-size: 14px;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.file-item:hover {
    background: #f0f2f4;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--commercial) 0%, #a85a1f 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.file-details h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
}

.file-details p {
    font-size: 12px;
    color: var(--text-light);
}

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

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: white;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: var(--commercial);
    color: white;
}

/* Utility Classes */
.full-width {
    grid-column: 1 / -1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

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

    h1 {
        font-size: 40px;
    }

    .subtitle {
        font-size: 18px;
    }

    .buttons {
        flex-direction: column;
    }

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

    .page-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .add-property-btn {
        width: 100%;
        justify-content: center;
    }

    .property-title {
        flex-direction: column;
    }

    .property-meta {
        flex-wrap: wrap;
    }
}

/* Session Messages */
.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease-out;
}

.success-message::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    font-weight: bold;
}

.error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease-out;
}

.error-message::before {
    content: '⚠';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    font-weight: bold;
}

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

/* Logo Image Styles */
.logo-image {
    max-width: 250px;
    height: auto;
    margin-bottom: 30px;
    display: block;
}

.logo-small-image {
    max-width: 150px;
    height: auto;
    margin-bottom: 25px;
    display: block;
}

.logo-header-image {
    max-width: 120px;
    height: auto;
    display: block;
}

/* Responsive logo sizing */
@media (max-width: 768px) {
    .logo-image {
        max-width: 200px;
    }
    
    .logo-small-image {
        max-width: 120px;
    }
    
    .logo-header-image {
        max-width: 100px;
    }
}

@media (max-width: 480px) {
    .logo-image {
        max-width: 150px;
    }
    
    .logo-small-image {
        max-width: 100px;
    }
    
    .logo-header-image {
        max-width: 80px;
    }
}

/* Navigation Menu */
.main-nav {
    display: flex;
    gap: 30px;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: rgba(26, 77, 46, 0.1);
    color: var(--primary);
}

.nav-link.active {
    background: var(--primary);
    color: white;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    padding: 8px;
    margin-top: 8px;
    z-index: 1000;
}

.dropdown-menu a {
    display: block;
    padding: 12px 16px;
    color: var(--text);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.dropdown-menu a:hover {
    background: var(--primary);
    color: white;
}

/* Responsive navigation */
@media (max-width: 1024px) {
    .main-nav {
        gap: 15px;
    }
    
    .nav-link {
        font-size: 14px;
        padding: 6px 12px;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
}
