/* 
 * FurryDiary (もふもふ日記) Styles
 */

/* ===== Base Styles ===== */
:root {
  --primary-color: #4a6da7;
  --primary-dark: #3a5a8c;
  --secondary-color: #f8b400;
  --text-color: #333;
  --light-text: #666;
  --lighter-text: #999;
  --error-color: #e74c3c;
  --success-color: #2ecc71;
  --border-color: #ddd;
  --light-bg: #f9f9f9;
  --white: #fff;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  --border-radius: 4px;
}

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

body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-bg);
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===== Layout ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 30px;
}

.app-title {
  color: var(--primary-color);
  font-size: 24px;
}

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

.content {
  min-height: calc(100vh - 200px);
  margin-bottom: 40px;
}

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

/* ===== Filter Container ===== */
.filter-container {
  margin-bottom: 20px;
  padding: 15px;
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-group label {
  font-weight: bold;
  white-space: nowrap;
}

.filter-group select {
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  min-width: 200px;
}

.filter-group select:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Responsive adjustments for filter */
@media (max-width: 768px) {
  .filter-group {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .filter-group select {
    width: 100%;
  }
}

.app-footer {
  text-align: center;
  padding: 20px 0;
  color: var(--lighter-text);
  border-top: 1px solid var(--border-color);
}

/* ===== Login Page ===== */
.login-container {
  max-width: 400px;
  margin: 80px auto;
  padding: 30px;
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.login-form h2 {
  margin-bottom: 20px;
  text-align: center;
  color: var(--primary-color);
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 16px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

.error-message {
  color: var(--error-color);
  margin-bottom: 20px;
  padding: 10px;
  background-color: rgba(231, 76, 60, 0.1);
  border-radius: var(--border-radius);
  display: none;
}

.form-container {
  background-color: var(--white);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 10px 15px;
  background-color: var(--light-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 16px;
  text-align: center;
  transition: all 0.3s ease;
}

.btn:hover {
  background-color: var(--border-color);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-danger {
  background-color: var(--error-color);
  color: var(--white);
  border: none;
}

.btn-danger:hover {
  background-color: #c0392b;
}

.btn-small {
  padding: 5px 10px;
  font-size: 14px;
}

/* ===== Tables ===== */
.records-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
  background-color: var(--white);
  box-shadow: var(--shadow);
}

.records-table th,
.records-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.records-table th {
  background-color: var(--light-bg);
  font-weight: bold;
}

.records-table tr:hover {
  background-color: rgba(74, 109, 167, 0.05);
}

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

/* ===== Loading & Messages ===== */
.loading {
  text-align: center;
  padding: 20px;
  color: var(--light-text);
}

.no-data {
  text-align: center;
  padding: 30px;
  color: var(--light-text);
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.not-found {
  text-align: center;
  padding: 30px;
  color: var(--light-text);
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

/* ===== Modal ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: var(--white);
  padding: 30px;
  border-radius: var(--border-radius);
  max-width: 500px;
  width: 90%;
}

.modal-content h3 {
  margin-bottom: 15px;
  color: var(--primary-color);
}

.modal-content p {
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .form-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .form-actions .btn {
    width: 100%;
  }
  
  .records-table {
    display: block;
    overflow-x: auto;
  }
}