/*
Theme Name: AccountPro Dashboard
Description: Professional accounting dashboard system with multi-user roles for WordPress
Version: 1.0
Author: Your Name
Text Domain: accountpro
*/

/* WordPress Theme Styles with Admin UI Integration */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f1f1f1;
  color: #23282d;
  margin: 0;
  padding: 0;
  line-height: 1.4;
  direction: rtl;
  text-align: right;
}

.accountpro-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header Styling - WordPress Admin Style */
.accountpro-header {
  background: #23282d;
  color: #fff;
  padding: 0;
  margin: 0 0 20px 0;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.accountpro-header .accountpro-container {
  padding: 15px 20px;
}

.accountpro-header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 400;
}

.accountpro-header h1 a {
  color: #fff;
  text-decoration: none;
}

.accountpro-header h1 a:hover {
  color: #00a0d2;
}

/* Card Styling - WordPress Meta Box Style */
.accountpro-card {
  background: #fff;
  border: 1px solid #ccd0d4;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
  border-radius: 0;
  padding: 20px;
  margin-bottom: 20px;
}

.accountpro-card h2,
.accountpro-card h3 {
  margin: 0 0 15px 0;
  padding: 0;
  font-size: 18px;
  font-weight: 600;
  color: #23282d;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

/* Button Styling - WordPress Button Style */
.accountpro-button {
  background: #0073aa;
  border-color: #0073aa;
  color: #fff;
  text-decoration: none;
  text-shadow: none;
  font-size: 13px;
  line-height: 2.15384615;
  min-height: 30px;
  margin: 0;
  padding: 0 12px;
  cursor: pointer;
  border-width: 1px;
  border-style: solid;
  border-radius: 3px;
  white-space: nowrap;
  box-sizing: border-box;
  display: inline-block;
  vertical-align: top;
  transition: all 0.1s ease-in-out;
}

.accountpro-button:hover,
.accountpro-button:focus {
  background: #005a87;
  border-color: #005a87;
  color: #fff;
  text-decoration: none;
}

.accountpro-button:active {
  background: #004a6b;
  border-color: #004a6b;
  transform: translateY(1px);
}

/* Success Button */
.accountpro-button.success {
  background: #00a32a;
  border-color: #00a32a;
}

.accountpro-button.success:hover {
  background: #008a20;
  border-color: #008a20;
}

/* Warning Button */
.accountpro-button.warning {
  background: #dba617;
  border-color: #dba617;
}

.accountpro-button.warning:hover {
  background: #c29d0b;
  border-color: #c29d0b;
}

/* Danger Button */
.accountpro-button.danger {
  background: #d63638;
  border-color: #d63638;
}

.accountpro-button.danger:hover {
  background: #b32d2e;
  border-color: #b32d2e;
}

/* Grid Layout */
.accountpro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

/* Layout - WordPress Admin Style */
.accountpro-layout {
  display: flex;
  min-height: calc(100vh - 32px);
  background: #f1f1f1;
}

.accountpro-sidebar {
  width: 280px;
  background: #23282d;
  padding: 0;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
}

.accountpro-sidebar h3 {
  color: #fff;
  margin: 0;
  padding: 20px;
  font-size: 18px;
  font-weight: 400;
  border-bottom: 1px solid #32373c;
}

.accountpro-sidebar nav {
  padding: 0;
}

.accountpro-main {
  flex: 1;
  padding: 20px;
  background: #f1f1f1;
}

/* Navigation Items - WordPress Menu Style */
.accountpro-nav-item {
  display: block;
  padding: 12px 20px;
  color: #a7aaad;
  text-decoration: none;
  border: none;
  border-right: 4px solid transparent;
  transition: all 0.1s ease-in-out;
  font-size: 14px;
}

.accountpro-nav-item:hover {
  background: #32373c;
  color: #00a0d2;
}

.accountpro-nav-item.active {
  background: #0073aa;
  color: #fff;
  border-right-color: #00a0d2;
}

/* Table Styling - WordPress WP List Table Style */
.accountpro-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #ccd0d4;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
  margin: 0;
}

.accountpro-table th {
  background: #f9f9f9;
  border-bottom: 1px solid #ccd0d4;
  padding: 8px 10px;
  text-align: right;
  font-weight: 600;
  color: #23282d;
  font-size: 14px;
}

.accountpro-table td {
  padding: 10px;
  border-bottom: 1px solid #ccd0d4;
  font-size: 14px;
  color: #23282d;
}

.accountpro-table tr:hover {
  background: #f9f9f9;
}

.accountpro-table tr:nth-child(even) {
  background: #fafafa;
}

.accountpro-table tr:nth-child(even):hover {
  background: #f5f5f5;
}

/* Form Styling - WordPress Form Style */
.accountpro-form {
  background: #fff;
  padding: 20px;
  border: 1px solid #ccd0d4;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
  margin: 20px 0;
}

.accountpro-input,
.accountpro-textarea {
  width: 100%;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #7e8993;
  border-radius: 4px;
  color: #32373c;
  font-size: 14px;
  line-height: 1.4;
  margin: 0 0 15px 0;
  box-sizing: border-box;
  transition: border-color 0.1s ease-in-out;
}

.accountpro-input:focus,
.accountpro-textarea:focus {
  outline: none;
  border-color: #007cba;
  box-shadow: 0 0 0 1px #007cba;
}

.accountpro-input::placeholder,
.accountpro-textarea::placeholder {
  color: #646970;
}

/* Select Styling */
select.accountpro-input {
  background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23646970' d='m0,0l2,2l2,-2z'/></svg>");
  background-repeat: no-repeat;
  background-position: left 12px center;
  background-size: 16px 16px;
  padding-left: 40px;
}

/* Alert Styling - WordPress Notice Style */
.accountpro-alert {
  padding: 12px;
  margin: 5px 0 15px 0;
  border-right: 4px solid #00a32a;
  background: #fff;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.accountpro-alert.success {
  border-right-color: #00a32a;
  background: #f0f6fc;
}

.accountpro-alert.error {
  border-right-color: #d63638;
  background: #fcf0f1;
}

.accountpro-alert.warning {
  border-right-color: #dba617;
  background: #fcf9e8;
}

.accountpro-alert.info {
  border-right-color: #72aee6;
  background: #f0f6fc;
}

/* Statistics Cards - WordPress Dashboard Widget Style */
.accountpro-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.accountpro-stat-card {
  background: #fff;
  border: 1px solid #ccd0d4;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
  padding: 20px;
  text-align: center;
  transition: box-shadow 0.1s ease-in-out;
}

.accountpro-stat-card:hover {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.accountpro-stat-number {
  font-size: 2.5rem;
  font-weight: 600;
  color: #0073aa;
  margin-bottom: 8px;
  line-height: 1;
}

.accountpro-stat-label {
  color: #646970;
  font-size: 14px;
  font-weight: 400;
}

/* Status Badges - WordPress Status Style */
.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pending {
  background: #f0f6fc;
  color: #0073aa;
  border: 1px solid #c3dcf3;
}

.status-approved {
  background: #f0f6fc;
  color: #00a32a;
  border: 1px solid #5fb85f;
}

.status-rejected {
  background: #fcf0f1;
  color: #d63638;
  border: 1px solid #e65054;
}

.status-completed {
  background: #f0f6fc;
  color: #00a32a;
  border: 1px solid #5fb85f;
}

/* Responsive Design */
@media screen and (max-width: 782px) {
  .accountpro-layout {
    flex-direction: column;
  }

  .accountpro-sidebar {
    width: 100%;
    order: 2;
  }

  .accountpro-main {
    order: 1;
  }

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

  .accountpro-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 480px) {
  .accountpro-stats {
    grid-template-columns: 1fr;
  }

  .accountpro-container {
    padding: 10px;
  }

  .accountpro-main {
    padding: 10px;
  }
}

/* WordPress Admin Bar Compatibility */
body.admin-bar .accountpro-layout {
  min-height: calc(100vh - 64px);
}

@media screen and (max-width: 782px) {
  body.admin-bar .accountpro-layout {
    min-height: calc(100vh - 46px);
  }
}

/* Loading States */
.accountpro-loading {
  opacity: 0.6;
  pointer-events: none;
}

.accountpro-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #0073aa;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Form Sections */
.form-section {
  background: #fff;
  border: 1px solid #ccd0d4;
  margin-bottom: 20px;
}

.form-section-header {
  background: #f9f9f9;
  border-bottom: 1px solid #ccd0d4;
  padding: 12px 20px;
  font-weight: 600;
  color: #23282d;
}

.form-section-content {
  padding: 20px;
}

/* WordPress-style Tabs */
.accountpro-tabs {
  border-bottom: 1px solid #ccd0d4;
  margin-bottom: 20px;
}

.accountpro-tab {
  display: inline-block;
  padding: 10px 15px;
  background: #f9f9f9;
  border: 1px solid #ccd0d4;
  border-bottom: none;
  margin-left: 5px;
  cursor: pointer;
  color: #23282d;
  text-decoration: none;
}

.accountpro-tab.active {
  background: #fff;
  border-bottom: 1px solid #fff;
  margin-bottom: -1px;
}

.accountpro-tab:hover {
  background: #fff;
}

/* File Upload Area */
.file-upload-area {
  border: 2px dashed #ccd0d4;
  padding: 40px;
  text-align: center;
  background: #fafafa;
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-upload-area:hover {
  border-color: #0073aa;
  background: #f0f6fc;
}

.file-upload-area.dragover {
  border-color: #00a32a;
  background: #f0f6fc;
}

/* Pagination */
.accountpro-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
  gap: 5px;
}

.accountpro-pagination a,
.accountpro-pagination span {
  padding: 8px 12px;
  border: 1px solid #ccd0d4;
  background: #fff;
  color: #0073aa;
  text-decoration: none;
  font-size: 14px;
}

.accountpro-pagination a:hover {
  background: #f0f6fc;
}

.accountpro-pagination .current {
  background: #0073aa;
  color: #fff;
  border-color: #0073aa;
}

/* Search and Filter Bar */
.accountpro-filters {
  background: #fff;
  border: 1px solid #ccd0d4;
  padding: 15px 20px;
  margin-bottom: 20px;
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.accountpro-filters input,
.accountpro-filters select {
  margin: 0;
  min-width: 200px;
}

/* Print Styles */
@media print {
  .accountpro-sidebar,
  .accountpro-button,
  .form-section {
    display: none !important;
  }

  .accountpro-main {
    padding: 0;
  }

  .accountpro-card {
    border: none;
    box-shadow: none;
    page-break-inside: avoid;
  }
}
