/*
Theme Name: Clockify Client Portal
Theme URI: https://example.com/clockify-portal
Author: Antigravity
Author URI: https://example.com
Description: A modern client portal integrating with Clockify to show monthly hours tracked.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: clockifyportal
*/

:root {
  --primary-color: #1a73e8; /* Google Blue */
  --primary-hover: #174ea6;
  --bg-color: #f8f9fa; /* Light grey bg */
  --card-bg: #ffffff;
  --text-primary: #202124;
  --text-secondary: #5f6368;
  --border-color: #dadce0;
  --input-bg: #ffffff;
  --success-color: #1e8e3e; /* Google Green */
  --danger-color: #d93025; /* Google Red */
}

[data-theme="dark"] {
  --primary-color: #8ab4f8; /* Google Blue Light */
  --primary-hover: #aecbfa;
  --bg-color: #202124;
  --card-bg: #292a2d;
  --text-primary: #e8eaed;
  --text-secondary: #9aa0a6;
  --border-color: #3c4043;
  --input-bg: #292a2d;
  --success-color: #81c995;
  --danger-color: #f28b82;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-hover);
}

/* Base Layout */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.site-header {
  background-color: var(--card-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.site-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.site-brand span {
  color: var(--primary-color);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.btn, .logout-btn {
  background-color: var(--primary-color);
  color: white;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.btn:hover, .logout-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  color: white;
}

/* Authentication Page */
.auth-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
  background: radial-gradient(circle at top right, #1e293b, #0f172a);
}

.auth-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 3rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.5s ease-out;
}

.auth-card h1 {
  text-align: center;
  margin-bottom: 0.5rem;
  font-size: 1.75rem;
}

.auth-card p.subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.auth-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.auth-form input[type="text"],
.auth-form input[type="password"] {
  width: 100%;
  padding: 0.875rem 1rem;
  margin-bottom: 1.5rem;
  background-color: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s;
}

.auth-form input[type="text"]:focus,
.auth-form input[type="password"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.auth-form input[type="submit"], .auth-form .submit-btn {
  width: 100%;
  background-color: var(--primary-color);
  color: white;
  padding: 1rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}

.auth-form input[type="submit"]:hover, .auth-form .submit-btn:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Dashboard */
.dashboard-container {
  flex: 1;
  padding: 3rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.page-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--text-secondary);
  margin-bottom: 3rem;
  font-size: 1.1rem;
}

/* Metrics Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.metric-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.metric-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.metric-title {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.metric-value {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.metric-unit {
  font-size: 1.5rem;
  color: var(--primary-color);
  font-weight: 600;
}

.metric-desc {
  margin-top: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.error-msg {
  color: var(--danger-color);
  background-color: rgba(239, 68, 68, 0.1);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.2);
  margin-bottom: 1.5rem;
}

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

/* Table Styles */
.table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background-color: var(--card-bg);
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.modern-table th {
  background-color: rgba(128, 128, 128, 0.05);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modern-table td {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  font-size: 0.95rem;
}

.modern-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.modern-table tbody tr:last-child td {
  border-bottom: none;
}

.status-tag {
  display: inline-block;
  padding: 4px 10px;
  background-color: rgba(99, 102, 241, 0.15);
  color: var(--primary-color);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-right: 6px;
  margin-bottom: 4px;
}

.duration-badge {
  font-family: monospace;
  font-weight: 600;
  color: var(--text-primary);
  background-color: rgba(128, 128, 128, 0.1);
  padding: 4px 8px;
  border-radius: 6px;
}

/* Tabs & Theme Toggler */
.tabs-nav {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.75rem 0.5rem;
  cursor: pointer;
  position: relative;
  transition: color 0.15s ease;
  margin-bottom: -1px;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--primary-color);
  border-bottom: 3px solid var(--primary-color);
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.theme-toggle-btn:hover {
  background: var(--card-bg);
  color: var(--primary-color);
}

