/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f7;
    color: #1d1d1f;
    line-height: 1.6;
  }
  
  /* Auth Pages (Login/Signup) */
  .auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }
  
  .auth-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    width: 100%;
    max-width: 400px;
  }
  
  .auth-box h1 {
    font-size: 32px;
    margin-bottom: 8px;
    text-align: center;
  }
  
  .auth-box h2 {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 24px;
    text-align: center;
    color: #666;
  }
  
  .auth-box input {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 12px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
  }
  
  .auth-box input:focus {
    outline: none;
    border-color: #0071e3;
  }
  
  .auth-box button {
    width: 100%;
    padding: 12px 16px;
    background: #0071e3;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
  }
  
  .auth-box button:hover {
    background: #0077ed;
  }
  
  .auth-link {
    text-align: center;
    margin-top: 20px;
    color: #666;
  }
  
  .auth-link a {
    color: #0071e3;
    text-decoration: none;
  }
  
  .error-message {
    background: #ffe5e5;
    color: #d32f2f;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    text-align: center;
  }
  
  /* Dashboard Layout */
  .dashboard-layout {
    display: flex;
    min-height: 100vh;
  }
  
  .sidebar {
    width: 250px;
    background: white;
    border-right: 1px solid #d2d2d7;
    padding: 24px;
    display: flex;
    flex-direction: column;
  }
  
  .sidebar h1 {
    font-size: 24px;
    margin-bottom: 32px;
  }
  
  .sidebar nav {
    flex: 1;
  }
  
  .sidebar nav a {
    display: block;
    padding: 12px 16px;
    color: #1d1d1f;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: background 0.2s;
  }
  
  .sidebar nav a:hover {
    background: #f5f5f7;
  }
  
  .sidebar nav a.active {
    background: #0071e3;
    color: white;
  }
  
  .sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid #d2d2d7;
    color: #666;
  }
  
  /* Main Content */
  .main-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
  }
  
  .dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
  }
  
  .dashboard-header h2 {
    font-size: 28px;
    font-weight: 600;
  }
  
  .stats {
    display: flex;
    gap: 16px;
  }
  
  .stat-box {
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
  }
  
  .stat-number {
    display: block;
    font-size: 28px;
    font-weight: 600;
    color: #0071e3;
  }
  
  .stat-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-top: 4px;
  }
  
  /* Action Bar */
  .action-bar {
    margin-bottom: 24px;
  }
  
  .btn-primary {
    background: #0071e3;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
  }
  
  .btn-primary:hover {
    background: #0077ed;
  }
  
  .btn-reply {
    background: #34c759;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
  }
  
  .btn-reply:hover {
    background: #30b351;
  }
  
  /* Messages */
  .messages-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  
  .message-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-left: 4px solid #d2d2d7;
  }
  
  .message-card.urgent {
    border-left-color: #ff3b30;
    background: #fff8f7;
  }
  
  .message-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
  }
  
  .message-property {
    display: block;
    color: #666;
    font-size: 14px;
    margin-top: 4px;
  }
  
  .message-meta {
    text-align: right;
  }
  
  .message-category {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 4px;
  }
  
  .message-category.URGENTE {
    background: #ffe5e5;
    color: #d32f2f;
  }
  
  .message-category.MANTENIMIENTO {
    background: #fff4e5;
    color: #ed6c02;
  }
  
  .message-category.PAGO {
    background: #e3f2fd;
    color: #0288d1;
  }
  
  .message-category.CONSULTA {
    background: #f3e5f5;
    color: #7b1fa2;
  }
  
  .message-time {
    display: block;
    font-size: 12px;
    color: #999;
  }
  
  .message-body p {
    margin-bottom: 8px;
    line-height: 1.6;
  }
  
  .message-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f5f5f7;
  }
  
  .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
  }
  
  /* Properties Grid */
  .properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
  }
  
  .property-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  }
  
  .property-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: #1d1d1f;
  }
  
  .property-rent {
    font-size: 24px;
    font-weight: 600;
    color: #0071e3;
    margin-bottom: 8px;
  }
  
  .property-notes {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f5f5f7;
    color: #666;
    font-size: 14px;
  }
  
  /* Modals */
  .modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    animation: fadeIn 0.2s;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  .modal-content {
    background: white;
    margin: 5% auto;
    padding: 32px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideDown 0.3s;
  }
  
  @keyframes slideDown {
    from {
      transform: translateY(-50px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
  
  .close {
    position: absolute;
    right: 16px;
    top: 16px;
    font-size: 28px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    line-height: 1;
  }
  
  .close:hover {
    color: #333;
  }
  
  .modal-content h2 {
    margin-bottom: 24px;
    font-size: 24px;
  }
  
  .modal-content input,
  .modal-content select,
  .modal-content textarea {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 12px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
  }
  
  .modal-content input:focus,
  .modal-content select:focus,
  .modal-content textarea:focus {
    outline: none;
    border-color: #0071e3;
  }
  
  .modal-content textarea {
    resize: vertical;
    min-height: 100px;
  }
  
  /* Responsive */
  @media (max-width: 768px) {
    .dashboard-layout {
      flex-direction: column;
    }
    
    .sidebar {
      width: 100%;
      border-right: none;
      border-bottom: 1px solid #d2d2d7;
    }
    
    .dashboard-header {
      flex-direction: column;
      align-items: flex-start;
    }
    
    .stats {
      width: 100%;
      margin-top: 16px;
    }
    
    .properties-grid {
      grid-template-columns: 1fr;
    }
  }

  /* Success Message */
.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    text-align: center;
    border: 1px solid #a5d6a7;
  }

  .delete-btn {
    background: #ff3b30;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
  }
  
  .delete-btn:hover {
    background: #ff2d1f;
  }