/* Base Styles */
:root {
  --primary: #4361ee;
  --primary-dark: #3a0ca3;
  --secondary: #f72585;
  --light: #f8f9fa;
  --dark: #212529;
  --success: #4bb543;
  --danger: #dc3545;
  --warning: #ffc107;
  --border-radius: 0.375rem;
  --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
  --border-radius-lg: 1rem; /* or a value you prefer */
  --primary: #4361ee;
  --primary-rgb: 67, 97, 238;
}

}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  /*background-color: var(--light);*/
  background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Login/Landing Page Specific */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding: 2rem;
}

.login-card {
  background: white;
  border-radius: var(--border-radius-lg);
  width: 100%;
  max-width: 400px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.login-card h2 {
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.login-card .form-control {
  margin-bottom: 1rem;
}

.login-card .btn {
  width: 100%;
  padding: 0.75rem;
  font-size: 1.1rem;
}

.btn {
  /* existing styles */
  border-radius: var(--border-radius-lg);
}

/* Header Styles */

.navbar.navbar-gradient-background {
  background: linear-gradient(to right, var(--light), var(--e9ecef));
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  padding: 0.8rem 0;
  border-bottom: 2px solid rgba(0, 0, 0, 0.09);
}
.navbar-brand {
  font-weight: 700;
  color: var(--primary); /* Use your primary color variable */
  font-size: 1.4rem; /* Adjust font size */
  display: flex;
  align-items: center;
}

.navbar-brand i {
  margin-right: 0.75rem; /* Adjust space between icon and text */
  color: var(--primary-dark); /* Use a slightly different shade for icon */
}
.navbar-nav .nav-link {
  position: relative;
  text-decoration: none;
  color: var(--dark); /* Use your dark color variable */
  padding: 0.6rem 1rem; /* Adjust padding */
  transition: color 0.3s ease;
  font-weight: 500; /* Adjust font weight */
}
.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px; /* Underline thickness */
  background-color: var(--primary); /* Use your primary color variable */
  transition: width 0.3s ease-in-out;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--primary); /* Highlight on hover and active */
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 100%;
}

/* Style Icons in Navigation Links */
.navbar-nav .nav-link i {
  margin-right: 0.5rem; /* Space between icon and text */
  color: var(--secondary); /* Use a secondary color for icons */
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem 0;
}
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Cards */
.card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background-color: #f8f9fa;
}

.card-body {
  padding: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(45deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
  border-radius: var(--border-radius-lg);
  transition: all 0.3s ease;
}

.btn-primary:hover {
background: linear-gradient(45deg, var(--primary-dark), var(--primary));
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

/* Forms */
.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  transition: var(--transition);
  padding: 0.75rem 1rem;
}

.form-control:focus {
  border-color: var(--primary);
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.25);
}
/* Auth Styles */
.auth-container {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
}

.auth-header {
    padding: 30px;
    text-align: center;
    background: #4361ee;
    color: white;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.auth-logo i {
    font-size: 2.5rem;
    margin-right: 15px;
}

.auth-logo h1 {
    margin: 0;
    font-size: 1.8rem;
}

.auth-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.btn-block {
    display: block;
    width: 100%;
    padding: 12px;
}

.auth-footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #eee;
}

/* Dashboard Styles */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: #2a3042;
    color: white;
    padding: 20px 0;
}

.main-content {
    flex: 1;
    padding: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
/* Add this to your CSS file (e.g., assets/css/main.css) */

/* Style the left toolbox panel */
.container .row {
  display: flex; /* Enable Flexbox for the row */
  /* align-items: stretch; This is the default and should make columns equal height */
}
.col-md-4 .toolbar {
  background-color: #ffffff; /* Clean white background */
  border-radius: 0.5rem; /* Slightly more rounded corners */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08); /* More pronounced shadow */
  padding: 1.5rem; /* Increase padding */
  border: 1px solid rgba(0, 0, 0, 0.05); /* Subtle border */
  /* If you want a fixed toolbox, add: */
   position: sticky; top: 1rem; align-self: flex-start; max-height: calc(100vh - 2rem); overflow-y: auto;
}
/* Style headings within the toolbox */
.col-md-4 .toolbar h5 {
  color: var(--primary-dark); /* Use a darker shade of primary for headings */
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1); /* Slightly stronger separator */
  font-size: 1.15rem;
  font-weight: 600; /* Bolder headings */
}
/* Style buttons within the toolbox */
.col-md-4 .toolbar .btn {
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  /* Add subtle hover effect */
  box-shadow: none; /* Remove default button shadow if any */
}
.col-md-4 .toolbar .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
/* Style input groups within the toolbox */
.col-md-4 .toolbar .input-group-text {
  background-color: var(--light);
  border-color: #ced4da;
}

/* Style form controls within the toolbox */
.col-md-4 .toolbar .form-control {
  border-color: #ced4da; /* Match Bootstrap's default border color */
}

/* Style select within the toolbox */
.col-md-4 .toolbar .form-select {
    border-color: #ced4da; /* Match Bootstrap's default border color */
}

canvas {
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}
/* Refine canvas wrapper styling if needed */
.canvas-wrapper {
background-color: #f8f9fa; /* Light background for the canvas area */
  border-radius: 0.5rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  display: flex; /* Use flexbox to center canvas easily */
  justify-content: center;
  align-items: center;
  /* Adjust min-height to ensure it takes up space */
  min-height: 500px; /* Or a value that matches your design expectations */
}
/* Style the canvas element itself if needed */
#certCanvas {
  border: 2px dashed #ccc; /* Refine border */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); /* Subtle shadow for canvas */
}

/* Style for active formatting buttons */
.btn-group .btn.active {
  background-color: #0d6efd;
  color: white;
}

/* Toolbox section styling */
.toolbar {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.toolbar h5 {
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

/* Input group styling */
.input-group-text {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
}

/* Shadow controls */
#shadowOffsetX, #shadowOffsetY {
  text-align: center;
}
/*Template-Index*/
 .wrapper {
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }
.wrapper > .main-content {
      flex: 1;
      padding: 20px;
      max-width: 1200px;
      margin: auto;
      width: 100%;
    }
.wrapper > .main-content > .card {
      border: none;
      border-radius: 1rem;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }	
.wrapper > .main-content > .card > .card-header-custom {
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: linear-gradient(to right, #0d6efd, #2c7be5);
      color: #fff;
      padding: 1rem 1.5rem;
      border-top-left-radius: .5rem;
      border-top-right-radius: .5rem;
    }	
.card-body	> .templates-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: 20px;
      margin-top: 20px;
    }
.card-body	> .templates-grid > .template-card {
      background: #fff;
      border: 1px solid #dee2e6;
      border-radius: 0.5rem;
      overflow: hidden;
      transition: transform 0.2s ease-in-out;
    }
.card-body	> .templates-grid > .template-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    }	
.card-body	> .templates-grid > .template-card > .template-thumbnail {
      width: 100%;
      height: 200px;
      object-fit: contain;
      background-color: #f0f0f0;
    }
.card-body	> .templates-grid > .template-card > .template-info {
      padding: 15px;
    }
.card-body	> .templates-grid > .template-card > .template-info h5 {
      font-size: 1rem;
      font-weight: 600;
      margin-bottom: 10px;
    }
.card-body	> .templates-grid > .template-card > .template-info > .template-actions {
	  display: flex;
	  flex-direction: row;
	  flex-wrap: wrap;
	  gap: 6px;
	  margin-top: 10px;
	}
.card-body	> .templates-grid > .template-card > .template-info > .template-actions .btn {
	  flex: 1 1 auto;
	  white-space: nowrap;
	  min-width: 80px;
	  text-align: center;
	  padding: 6px 10px;
	}
.card-body	> .templates-grid > .template-card > .template-info > .template-actions > .btn-edit {
      background-color: #198754;
      color: white;
    }
.card-body	> .templates-grid > .template-card > .template-info > .template-actions > .btn-delete {
      background-color: #dc3545;
      color: white;
    }	
/* Responsive Adjustments */
@media (max-width: 768px) {
  .login-card {
    padding: 1.5rem;
  }
  
  .container {
    padding: 0 1rem;
  }
}
@media (max-width: 991.98px) { /* Bootstrap's default breakpoint for collapsing */
  .navbar-nav {
    align-items: flex-start;
    margin-top: 1rem;
  }

  .navbar-nav .nav-item {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
  }

  .navbar-nav .nav-link::after {
      display: none; /* Hide underline in collapsed menu */
  }
}